~henrix/ubuntu/precise/open-vm-dkms/lp-1416003

« back to all changes in this revision

Viewing changes to modules/linux/vsock/include/compat_slab.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-10-23 15:32:00 UTC
  • mfrom: (1.1.2 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081023153200-gc1bfx89hj35c799
Tags: 2008.10.10-123053-2
* Correcting typo in dh_installinit call.
* Downgrading depends on module-assistant to recommends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 * Up to 2.6.23 kmem_cache constructor has three arguments - pointer to block to
58
58
 * prepare (aka "this"), from which cache it came, and some unused flags.  After
59
59
 * 2.6.23 flags were removed, and order of "this" and cache parameters was swapped...
 
60
 * Since 2.6.27-rc2 everything is different again, and ctor has only one argument.
 
61
 *
 
62
 * HAS_3_ARGS has precedence over HAS_2_ARGS if both are defined.
60
63
 */
61
64
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) && !defined(VMW_KMEMCR_CTOR_HAS_3_ARGS)
62
65
#  define VMW_KMEMCR_CTOR_HAS_3_ARGS
63
66
#endif
64
 
#ifdef VMW_KMEMCR_CTOR_HAS_3_ARGS
 
67
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) && !defined(VMW_KMEMCR_CTOR_HAS_2_ARGS)
 
68
#  define VMW_KMEMCR_CTOR_HAS_2_ARGS
 
69
#endif
 
70
 
 
71
#if defined(VMW_KMEMCR_CTOR_HAS_3_ARGS)
65
72
typedef void compat_kmem_cache_ctor(void *, compat_kmem_cache *, unsigned long);
66
 
#else
 
73
#define COMPAT_KMEM_CACHE_CTOR_ARGS(arg) void *arg, \
 
74
                                         compat_kmem_cache *cache, \
 
75
                                         unsigned long flags
 
76
#elif defined(VMW_KMEMCR_CTOR_HAS_2_ARGS)
67
77
typedef void compat_kmem_cache_ctor(compat_kmem_cache *, void *);
 
78
#define COMPAT_KMEM_CACHE_CTOR_ARGS(arg) compat_kmem_cache *cache, \
 
79
                                         void *arg
 
80
#else
 
81
typedef void compat_kmem_cache_ctor(void *);
 
82
#define COMPAT_KMEM_CACHE_CTOR_ARGS(arg) void *arg
68
83
#endif
69
84
 
70
85
#endif /* __COMPAT_SLAB_H__ */