lock: merge spinlock and mtx locks into one

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-08-13 14:19:10 -04:00
commit 2076f1dae1
Signed by: michaelsshaw
GPG key ID: 5A5E0FB20708A9E7
32 changed files with 158 additions and 169 deletions

View file

@ -3,7 +3,7 @@
#define _THREAD_H_
#include <kernel/types.h>
#include <kernel/spinlock.h>
#include <kernel/lock.h>
#include <kernel/mem.h>
#include <kernel/page.h>
#include <fs/vfs.h>
@ -33,7 +33,7 @@ struct file {
u64 flags;
u64 offset;
u64 refcount;
spinlock_t lock;
lock_t lock;
};
struct thread {
@ -53,15 +53,15 @@ struct thread {
pgd_t *pgd;
spinlock_t mem_lock;
lock_t mem_lock;
rbtree_t memmap;
spinlock_t alloc_lock;
lock_t alloc_lock;
rbtree_t alloc_map;
uaddr_t entry;
spinlock_t fd_lock;
lock_t fd_lock;
size_t fd_array_size;
struct file *fdt;