lkml.org 
[lkml]   [2002]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] lock assertion macros for 2.5.30
    Date
    A couple of whitespace glitches:

    > +#if defined(CONFIG_DEBUG_SPINLOCK) && defined(CONFIG_SMP)
    > +#define MUST_HOLD(lock)                        BUG_ON(!spin_is_locked(lock))
    > +#define MUST_NOT_HOLD(lock)            BUG_ON(spin_is_locked(lock))
    > +#define MUST_HOLD_RW(lock)             BUG_ON(!rwlock_is_locked(lock))
    > +#else
    > +#define MUST_HOLD(lock)                        do { } while(0)
    > +#define MUST_NOT_HOLD(lock)            do { } while(0)
    > +#define MUST_HOLD_RW(lock)             do { } while(0)
    > +#endif /* CONFIG_DEBUG_SPINLOCK && CONFIG_SMP */

    Random gripe: don't all those do { } whiles look silly? We need

    #define NADA do { } while (0)

    or similar.

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

    \
     
     \ /
      Last update: 2005-03-22 13:27    [W:0.023 / U:0.432 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site