xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/linux/kernel.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 #ifndef _LINUX_KERNEL_H
2 #define _LINUX_KERNEL_H
3 
4 /*
5  * 'kernel.h' contains some often-used function prototypes etc
6  */
7 
8 
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.. */
25 };
26 
27 /* Force a compilation error if condition is true */
28 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
29 
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)
35 
36 /* Trap pasters of __FUNCTION__ at compile-time */
37 #define __FUNCTION__ (__func__)
38 
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
45 
46 #endif
47