yeah
This commit is contained in:
+4
-4
@@ -1,8 +1,8 @@
|
||||
#include <string.h>
|
||||
#include <zinnia/alloc.h>
|
||||
#include <zinnia/compiler.h>
|
||||
#include <zinnia/errno.h>
|
||||
#include <zinnia/spin.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct {
|
||||
size_t num_pages; // Amount of pages connected to this slab.
|
||||
@@ -10,8 +10,8 @@ typedef struct {
|
||||
} slab_info;
|
||||
|
||||
struct slab {
|
||||
struct spinlock lock; // Access lock.
|
||||
size_t ent_size; // Size of one entry.
|
||||
spinlock_t lock; // Access lock.
|
||||
size_t ent_size; // Size of one entry.
|
||||
void** head;
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ typedef struct {
|
||||
static struct slab slabs[8] = {0};
|
||||
|
||||
static errno_t slab_new(struct slab* slab, size_t size) {
|
||||
slab->lock = (struct spinlock){0};
|
||||
slab->lock = (spinlock_t){0};
|
||||
|
||||
// Allocate a new page for the head.
|
||||
phys_t addr;
|
||||
|
||||
Reference in New Issue
Block a user