提交 c8f06a06 编写于 作者: M Michael S. Tsirkin

ptr_ring: fix build

Fixes after recent use of kvmalloc
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 0c8efd61
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#define likely(x) (__builtin_expect(!!(x), 1)) #define likely(x) (__builtin_expect(!!(x), 1))
#define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a)) #define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a))
#define SIZE_MAX (~(size_t)0) #define SIZE_MAX (~(size_t)0)
#define KMALLOC_MAX_SIZE SIZE_MAX
#define BUG_ON(x) assert(x)
typedef pthread_spinlock_t spinlock_t; typedef pthread_spinlock_t spinlock_t;
...@@ -57,6 +59,9 @@ static void kfree(void *p) ...@@ -57,6 +59,9 @@ static void kfree(void *p)
free(p); free(p);
} }
#define kvmalloc_array kmalloc_array
#define kvfree kfree
static void spin_lock_init(spinlock_t *lock) static void spin_lock_init(spinlock_t *lock)
{ {
int r = pthread_spin_init(lock, 0); int r = pthread_spin_init(lock, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册