start Mutex rework

This commit is contained in:
2026-10-19 20:01:23 +02:00
parent 4384d36246
commit b5bada597a
2 changed files with 7 additions and 10 deletions
+4 -7
View File
@@ -1,11 +1,8 @@
#pragma once #pragma once
struct task; #include <stdint.h>
struct mutex { typedef uintptr_t mutex_t;
struct task* owner;
bool flag;
};
void mutex_lock(struct mutex* mutex); void mutex_lock(mutex_t* mutex);
void mutex_unlock(struct mutex* mutex); void mutex_unlock(mutex_t* mutex);
+3 -3
View File
@@ -106,7 +106,7 @@ struct vfs_entry {
// The name of this entry. // The name of this entry.
char* name; char* name;
size_t name_len; size_t name_len;
struct mutex lock; mutex_t lock;
enum vfs_entry_state state; enum vfs_entry_state state;
// The inode this entry points to when present. // The inode this entry points to when present.
@@ -250,7 +250,7 @@ struct vfs_node {
const struct vfs_file_ops* file_ops; const struct vfs_file_ops* file_ops;
struct vfs_super_block* sb; struct vfs_super_block* sb;
struct mutex lock; mutex_t lock;
void* priv; void* priv;
ino_t id; ino_t id;
@@ -305,7 +305,7 @@ struct vfs_file {
enum vfs_file_position position_kind; enum vfs_file_position position_kind;
off_t position; off_t position;
struct mutex lock; mutex_t lock;
struct vfs_path path; struct vfs_path path;
bool has_path; bool has_path;