lock: merge spinlock and mtx locks into one
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
3e5abada9b
commit
2076f1dae1
32 changed files with 158 additions and 169 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#define _SLAB_H_
|
||||
|
||||
#include <kernel/common.h>
|
||||
#include <kernel/spinlock.h>
|
||||
#include <kernel/lock.h>
|
||||
|
||||
#define ALLOC_KERN 0x1
|
||||
#define ALLOC_USER 0x2
|
||||
|
|
@ -19,7 +19,7 @@ typedef struct _mem_cache_t {
|
|||
size_t num_members;
|
||||
size_t num_free;
|
||||
vaddr_t next_free;
|
||||
spinlock_t lock;
|
||||
lock_t lock;
|
||||
struct _mem_cache_t *next;
|
||||
} mem_cache_t;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue