Results 1 to 1 of 1
Hi- I'm wanting to use an assert() equivalent in my kernel (C) code. AFAIK there isn't a standard one (please correct me if I'm wrong), and while it's not difficult ...
- 06-13-2007 #1Just Joined!
- Join Date
- Jun 2006
- Location
- Reading, UK
- Posts
- 5
assert() for kernel code
Hi- I'm wanting to use an assert() equivalent in my kernel (C) code. AFAIK there isn't a standard one (please correct me if I'm wrong), and while it's not difficult to write something that printk's an appropriate message, what happens next?
That is, I don't want the code to continue after a failed assertion (eg. it will access a NULL pointer), the code can't exit(), and if it goes into a loop:
then I can't rmmod it or shut down cleanly.Code:for (;;) schedule;
Any ideas?
Cheers
John


Reply With Quote
