This commit is contained in:
2026-09-16 04:37:37 +02:00
parent e71245c082
commit 3e9bdf72c9
74 changed files with 555 additions and 567 deletions
+4 -4
View File
@@ -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;