Re: Asserts in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 18 Apr 2008 17:34:33 -0700
"Mrunal Gawade" <mrunal.gawade@xxxxxxxxx> wrote:

> Does Linux kernel has assert?   I am trying to port a user land program with
> asserts and want to use them in kernel too. What is the header file in which
> its declared, if it is. I tried "grep" and other commands but could not
> find.

You can use BUG_ON() with a condition that should not happen
between the braces.

assert(foo) is the equivalent of BUG_ON(!(foo))

-- 
All rights reversed.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux