Back to home page

LXR

 
 

    


0001 /*
0002  * Generate definitions needed by the preprocessor.
0003  * This code generates raw asm output which is post-processed
0004  * to extract and format the required data.
0005  */
0006 
0007 #define __GENERATING_BOUNDS_H
0008 /* Include headers that define the enum constants of interest */
0009 #include <linux/page-flags.h>
0010 #include <linux/mmzone.h>
0011 #include <linux/kbuild.h>
0012 #include <linux/log2.h>
0013 #include <linux/spinlock_types.h>
0014 
0015 void foo(void)
0016 {
0017     /* The enum constants to put into include/generated/bounds.h */
0018     DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
0019     DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);
0020 #ifdef CONFIG_SMP
0021     DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));
0022 #endif
0023     DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
0024     /* End of constants */
0025 }