lkml.org 
[lkml]   [2000]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [bugfix] SMP, shm-2.3.52-A0
Ingo Molnar wrote:
>
> > + KASSERT(spin_is_locked(&kernel_flag));
>
> this is more readable i believe:
>
> if (!spin_is_locked(&kernel_flag))
> BUG();

Yes. But your assertion needs to be physically removed from production
code, whereas the presence/absence of KASSERT can be centrally
controlled.

if (assertions && !spin_is_locked(&kernel_flag))
BUG();

will compile to nothing if 'assertions' is constant zero.

-
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:0.071 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site