forked from cppcheck-opensource/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux-3.11.h
More file actions
17 lines (12 loc) · 717 Bytes
/
linux-3.11.h
File metadata and controls
17 lines (12 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#define __alignof__(x) 1
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
#define BUG_ON(C) if (C) exit(1)
#define GOTO(label, rc) goto label
#define RETURN(x) return x
#define NVERSION(version) (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#define __get_user(x, ptr) ((x) = somevalue + sizeof(*ptr))
void panic(const char *fmt, ...) __attribute__((noreturn));