lkml.org 
[lkml]   [2000]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [Announce] BKL shifting into drivers and filesystems - beware
    Date
    From
    David Woodhouse wrote:
    >
    > torvalds@transmeta.com said:
    > > The thing I hate, though, is code like
    > > #if LINUX_VERSION_CODE >= VERSION(2,5,10)
    > > lock_kernel();
    > > #endif
    > > in drivers. _Particularly_ in drivers.
    >
    > Hmmm. Just as well I resisted the temptation to include a handful of...
    >
    > #if LINUX_VERSION_CODE < 0x20400
    > MOD_INC_USE_COUNT
    > #endif
    >
    > ... in the last patch I sent you then :)

    As a "compatibility" issue, I would recommend that you include
    "compatmac.h", and that compatmac be augmented with:

    #if LINUX_VERSION_CODE < 0x20400
    #define OLD_MOD_INC_USE_COUNT MOD_INC_USE_COUNT
    #else
    #define OLD_MOD_INC_USE_COUNT /* Nothing */
    #endif

    and similarly a construct for the lock_kernel.

    This prevents the ugly inline #ifdefs . It's not as clean as
    completely removing them, but in my opinion, it will do for the time
    being. (We squashed a bunch of bugs yesterday by porting over the 2.4
    driver for a card to 2.2. If compatmac will allow the source file to
    be identical that'll be even easier in the future. Now we have to
    handle the modcounts every time.)


    Roger.

    --
    ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
    *-- BitWizard writes Linux device drivers for any device you may have! --*
    * Common sense is the collection of *
    ****** prejudices acquired by age eighteen. -- Albert Einstein ********

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:57    [W:2.708 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site