x*******i 发帖数: 14 | 1 static DEFINE_MUTEX(dst_gc_mutex); //code is in linux/net/core/dst.c
question: in this line, static is used to define what? variable or function?
tks!
| X****r 发帖数: 3557 | 2 DEFINE_MUTEX是一个宏,定义在linux/include/linux/mutex.h
#define DEFINE_MUTEX(mutexname) \
struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
所以这里static是用来修饰一个变量dst_gc_mutex。
function?
【在 x*******i 的大作中提到】 : static DEFINE_MUTEX(dst_gc_mutex); //code is in linux/net/core/dst.c : question: in this line, static is used to define what? variable or function? : tks! :
|
|