~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to datapath/linux/compat/include/linux/genetlink.h

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __GENETLINK_WRAPPER_H
2
 
#define __GENETLINK_WRAPPER_H 1
3
 
 
4
 
#include <linux/version.h>
5
 
#include_next <linux/genetlink.h>
6
 
 
7
 
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
8
 
#ifdef CONFIG_PROVE_LOCKING
9
 
static inline int lockdep_genl_is_held(void)
10
 
{
11
 
        return 1;
12
 
}
13
 
#endif
14
 
#endif
15
 
 
16
 
#ifndef genl_dereference
17
 
#include <linux/rcupdate.h>
18
 
 
19
 
#define genl_dereference(p)                                     \
20
 
        rcu_dereference_protected(p, lockdep_genl_is_held())
21
 
#endif
22
 
 
23
 
#endif /* linux/genetlink.h wrapper */