vfs: restructure vfs to reduce various errors

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-05 15:55:26 +02:00
commit 0c29f0e517
7 changed files with 220 additions and 253 deletions

View file

@ -2,12 +2,13 @@
#ifndef _RWLOCK_H_
#define _RWLOCK_H_
#include <lib/sem.h>
#include <kernel/spinlock.h>
#include <kernel/types.h>
typedef struct _rwlock {
sem_t sem;
spinlock_t reader_lock;
u64 reader_count;
typedef struct {
spinlock_t lock;
u64 readers;
bool writer;
} rwlock_t;
void read_lock(rwlock_t *lock);