[lkml]   [1999]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] *(int*)0 = 0 & variations
assert should definitely be more informative, and an assertion failure
is more than a debug statement. The following functions more like the
userland version:

#ifndef NDEBUG
# define kassert(cond) \
if (!(cond)) { \
printk (KERN_ERR "kassert failed in function %s, file %s, line %d:
%s\n", \
__FILE__, \
__LINE__, \
__STRING(cond)); \
*(int*)0 = 0; \
# define kassert(cond)

You could put some additional switches in there to enable or disable the
oops after the printk, or to change KERN_ERR to something else.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:52    [W:0.087 / U:1.344 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site