linuxkpi: Add bitmap_alloc and bitmap_free
This is a simple call to kmallock_array/kfree, therefore include linux/slab.h as this is where the kmalloc_array/kfree definition is. Sponsored-by: The FreeBSD Foundation Reviewed by: hselsasky Differential Revision: https://reviews.freebsd.org/D24794
This commit is contained in:
parent
8123bbf186
commit
ce03b3013f
@ -30,6 +30,7 @@
|
||||
#define _LINUX_BITMAP_H_
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
static inline void
|
||||
bitmap_zero(unsigned long *addr, const unsigned int size)
|
||||
@ -309,4 +310,10 @@ bitmap_xor(unsigned long *dst, const unsigned long *src1,
|
||||
dst[i] = src1[i] ^ src2[i];
|
||||
}
|
||||
|
||||
static inline void
|
||||
bitmap_free(const unsigned long *bitmap)
|
||||
{
|
||||
kfree(bitmap);
|
||||
}
|
||||
|
||||
#endif /* _LINUX_BITMAP_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user