Linux kernel 地址空间,编译器.h中的上下文宏

Linux kernel 地址空间,编译器.h中的上下文宏,linux-kernel,Linux Kernel,如何理解include/linux/compiler.h中的以下宏,主要是地址空间、上下文宏 请参阅,其中的关键点是ifdef检查程序。谷歌稀疏;程序检查器。普通的Linux编译不使用这个。我已经参考了这个GCC页面,但是看不到noderef、address_space上的任何指针以及它们在这里的帮助。 7 # define __user __attribute__((noderef, address_space(1))) 8 # define __kernel __

如何理解include/linux/compiler.h中的以下宏,主要是地址空间、上下文宏


请参阅,其中的关键点是ifdef检查程序。谷歌稀疏;程序检查器。普通的Linux编译不使用这个。我已经参考了这个GCC页面,但是看不到noderef、address_space上的任何指针以及它们在这里的帮助。
7 # define __user         __attribute__((noderef, address_space(1)))
8 # define __kernel       __attribute__((address_space(0)))
9 # define __safe         __attribute__((safe))
10 # define __force        __attribute__((force))
11 # define __nocast       __attribute__((nocast))
12 # define __iomem        __attribute__((noderef, address_space(2)))
13 # define __must_hold(x) __attribute__((context(x,1,1)))
14 # define __acquires(x)  __attribute__((context(x,0,1)))
15 # define __releases(x)  __attribute__((context(x,1,0)))
16 # define __acquire(x)   __context__(x,1)
17 # define __release(x)   __context__(x,-1)
18 # define __cond_lock(x,c)       ((c) ? ({ __acquire(x); 1; }) : 0)
19 # define __percpu       __attribute__((noderef, address_space(3)))
20 #ifdef CONFIG_SPARSE_RCU_POINTER
21 # define __rcu          __attribute__((noderef, address_space(4)))
22 #else
23 # define __rcu
24 #endif