File: /usr/include/linux/cache.h

1     #ifndef __LINUX_CACHE_H
2     #define __LINUX_CACHE_H
3     
4     #include <asm/cache.h>
5     
6     #ifndef L1_CACHE_ALIGN
7     #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
8     #endif
9     
10     #ifndef SMP_CACHE_BYTES
11     #define SMP_CACHE_BYTES L1_CACHE_BYTES
12     #endif
13     
14     #ifndef ____cacheline_aligned
15     #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
16     #endif
17     
18     #ifndef __cacheline_aligned
19     #ifdef MODULE
20     #define __cacheline_aligned ____cacheline_aligned
21     #else
22     #define __cacheline_aligned					\
23       __attribute__((__aligned__(SMP_CACHE_BYTES),			\
24     		 __section__(".data.cacheline_aligned")))
25     #endif
26     #endif /* __cacheline_aligned */
27     
28     #endif /* __LINUX_CACHE_H */
29