start Mutex rework
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
struct task;
|
||||
#include <stdint.h>
|
||||
|
||||
struct mutex {
|
||||
struct task* owner;
|
||||
bool flag;
|
||||
};
|
||||
typedef uintptr_t mutex_t;
|
||||
|
||||
void mutex_lock(struct mutex* mutex);
|
||||
void mutex_unlock(struct mutex* mutex);
|
||||
void mutex_lock(mutex_t* mutex);
|
||||
void mutex_unlock(mutex_t* mutex);
|
||||
|
||||
@@ -106,7 +106,7 @@ struct vfs_entry {
|
||||
// The name of this entry.
|
||||
char* name;
|
||||
size_t name_len;
|
||||
struct mutex lock;
|
||||
mutex_t lock;
|
||||
|
||||
enum vfs_entry_state state;
|
||||
// The inode this entry points to when present.
|
||||
@@ -250,7 +250,7 @@ struct vfs_node {
|
||||
const struct vfs_file_ops* file_ops;
|
||||
struct vfs_super_block* sb;
|
||||
|
||||
struct mutex lock;
|
||||
mutex_t lock;
|
||||
void* priv;
|
||||
|
||||
ino_t id;
|
||||
@@ -305,7 +305,7 @@ struct vfs_file {
|
||||
|
||||
enum vfs_file_position position_kind;
|
||||
off_t position;
|
||||
struct mutex lock;
|
||||
mutex_t lock;
|
||||
|
||||
struct vfs_path path;
|
||||
bool has_path;
|
||||
|
||||
Reference in New Issue
Block a user