Import asm headers for 64-bit glibc compilation
[linux-headers-for-nacl.git] / include / linux / kernel.h
blobd2e207e081e2b2f38cf949aed4353d8d1e707507
1 #ifndef _LINUX_KERNEL_H
2 #define _LINUX_KERNEL_H
4 /*
5 * 'kernel.h' contains some often-used function prototypes etc
6 */
9 #define SI_LOAD_SHIFT 16
10 struct sysinfo {
11 long uptime; /* Seconds since boot */
12 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
13 unsigned long totalram; /* Total usable main memory size */
14 unsigned long freeram; /* Available memory size */
15 unsigned long sharedram; /* Amount of shared memory */
16 unsigned long bufferram; /* Memory used by buffers */
17 unsigned long totalswap; /* Total swap space size */
18 unsigned long freeswap; /* swap space still available */
19 unsigned short procs; /* Number of current processes */
20 unsigned short pad; /* explicit padding for m68k */
21 unsigned long totalhigh; /* Total high memory size */
22 unsigned long freehigh; /* Available high memory size */
23 unsigned int mem_unit; /* Memory unit size in bytes */
24 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
27 /* Force a compilation error if condition is true */
28 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
30 /* Force a compilation error if condition is true, but also produce a
31 result (of value 0 and type size_t), so the expression can be used
32 e.g. in a structure initializer (or where-ever else comma expressions
33 aren't permitted). */
34 #define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
36 /* Trap pasters of __FUNCTION__ at compile-time */
37 #define __FUNCTION__ (__func__)
39 /* This helps us to avoid #ifdef CONFIG_NUMA */
40 #ifdef CONFIG_NUMA
41 #define NUMA_BUILD 1
42 #else
43 #define NUMA_BUILD 0
44 #endif
46 #endif