Re: [patch] block/IDE/interrupt lockup

Keith Owens (kaos@ocs.com.au)
Sun, 31 Mar 2002 09:23:23 +1000


On Sat, 30 Mar 2002 11:06:25 -0800,
Andrew Morton <akpm@zip.com.au> wrote:
>What I'd like is a debugging function `can_sleep()'. This
>is good for documentary purposes, and will catch bugs.
>
>So kmalloc() would gain:
>
> if (gfp_flags & __GFP_WAIT)
> can_sleep();

can_sleep_if(gfp_flags & __GFP_WAIT) would be better. can_sleep_if()
is
do { } while(0)
for no debugging, for debugging it is
if (unlikely(condition)) {
whine(__stringify(condition))
}

One line instead of two, no references to variables when debugging is
off, automatically adds unlikely.

-
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/