Re: [PATCH] *(int*)0 = 0 & variations

Manfred Spraul (masp0008@stud.uni-sb.de)
Fri, 25 Jun 1999 12:09:43 +0200


Riley wrote:
>However, I would not be surprised to find that there are places in the
>kernel where if an assumption proves to be false, we would need to
>abort the operation that led to that function, and I would see
>something like the following being used:

kassert() is a nop in release builds, so kassert() can't be used
like this.
--> replace with
if(!cond) {
kassert(FALSE);
return;
}

I don't think that special purpose macros should be added to
<linux/kdebug.h>, instead it provides a framework and
you must use #ifdef CONFIG_KDEBUG if you need anything special.
[our NT driver: 1700 ASSERT() macros and 95 #ifdef BLD_DEBUG
for special checks such as debug only variables, memory corruption
tests, ...]

--
    Manfred

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