Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
genetlink.h
Go to the documentation of this file.
1 #ifndef __LINUX_GENERIC_NETLINK_H
2 #define __LINUX_GENERIC_NETLINK_H
3 
4 #include <uapi/linux/genetlink.h>
5 
6 
7 /* All generic netlink requests are serialized by a global lock. */
8 extern void genl_lock(void);
9 extern void genl_unlock(void);
10 #ifdef CONFIG_LOCKDEP
11 extern int lockdep_genl_is_held(void);
12 #endif
13 
21 #define rcu_dereference_genl(p) \
22  rcu_dereference_check(p, lockdep_genl_is_held())
23 
32 #define genl_dereference(p) \
33  rcu_dereference_protected(p, lockdep_genl_is_held())
34 
35 #define MODULE_ALIAS_GENL_FAMILY(family)\
36  MODULE_ALIAS_NET_PF_PROTO_NAME(PF_NETLINK, NETLINK_GENERIC, "-family-" family)
37 
38 #endif /* __LINUX_GENERIC_NETLINK_H */