Re: [PATCH] lock assertion macros for 2.5.30

Daniel Phillips (phillips@arcor.de)
Thu, 8 Aug 2002 00:30:10 +0200


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/