1
2 #ifndef __LINUX_GENERIC_NETLINK_H
3 #define __LINUX_GENERIC_NETLINK_H
4
5 #include <uapi/linux/genetlink.h>
6
7
8
9 extern void genl_lock(void);
10 extern void genl_unlock(void);
11 #ifdef CONFIG_LOCKDEP
12 extern bool lockdep_genl_is_held(void);
13 #endif
14
15
16 extern atomic_t genl_sk_destructing_cnt;
17 extern wait_queue_head_t genl_sk_destructing_waitq;
18
19
20
21
22
23
24
25
26 #define rcu_dereference_genl(p) \
27 rcu_dereference_check(p, lockdep_genl_is_held())
28
29
30
31
32
33
34
35
36 #define genl_dereference(p) \
37 rcu_dereference_protected(p, lockdep_genl_is_held())
38
39 #define MODULE_ALIAS_GENL_FAMILY(family)\
40 MODULE_ALIAS_NET_PF_PROTO_NAME(PF_NETLINK, NETLINK_GENERIC, "-family-" family)
41
42 #endif