start Mutex rework
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user