Re: [patch] block/IDE/interrupt lockup

From: Keith Owens (kaos@ocs.com.au)
Date: Sat Mar 30 2002 - 18:23:23 EST


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/



This archive was generated by hypermail 2b29 : Sun Mar 31 2002 - 22:00:19 EST