blob: d91a135cf51dbd494adebe503b617c57cc1977b8 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _ASM_GENERIC_BUG_H
13#define _ASM_GENERIC_BUG_H
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <linux/compiler.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080016
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017#ifndef HAVE_ARCH_BUG
18#define BUG()
19#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080020
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#ifndef HAVE_ARCH_BUG_ON
22#define BUG_ON(condition) do { if (condition) ; } while(0)
23#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080024
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025#ifndef HAVE_ARCH_WARN_ON
26#define WARN_ON(condition) do { if (condition) ; } while(0)
27#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080028
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029#define WARN_ON_ONCE(condition) ({ static int __warn_once = 1; int __ret = 0; if (unlikely((condition) && __warn_once)) { __warn_once = 0; WARN_ON(1); __ret = 1; } __ret; })
Ben Cheng4b29af02012-03-07 16:14:53 -080030
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031#define WARN_ON_SMP(x) do { } while (0)
Ben Cheng4b29af02012-03-07 16:14:53 -080032
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080033#endif