Implement the KMEM_CACHE() function macro in the LinuxKPI.

MFC after:	1 week
Submitted by:	Johannes Lundberg <johalun0@gmail.com>
Sponsored by:	Mellanox Technologies
Sponsored by:	Limelight Networks
This commit is contained in:
Hans Petter Selasky 2018-02-18 09:52:30 +00:00
parent 0628fc903e
commit 78d7441913
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329516

View File

@ -65,6 +65,10 @@ MALLOC_DECLARE(M_KMALLOC);
#define kmem_cache_free(...) linux_kmem_cache_free(__VA_ARGS__)
#define kmem_cache_destroy(...) linux_kmem_cache_destroy(__VA_ARGS__)
#define KMEM_CACHE(__struct, flags) \
linux_kmem_cache_create(#__struct, sizeof(struct __struct), \
__alignof(struct __struct), (flags), NULL)
typedef void linux_kmem_ctor_t (void *);
struct linux_kmem_cache {