Skip to content
Snippets Groups Projects
Commit e6726ba2 authored by Videau Luc's avatar Videau Luc
Browse files

feat: add Mutex in file struct

parent 31f1caa6
No related branches found
Tags tp1-act-4-3
No related merge requests found
......@@ -2,7 +2,7 @@
#define FILE_H
struct file {
enum { FD_NONE, FD_PIPE, FD_INODE, FD_DEVICE } type;
enum { FD_NONE, FD_PIPE, FD_INODE, FD_DEVICE, FD_MUTEX } type;
int ref; // reference count
char readable;
char writable;
......@@ -11,6 +11,7 @@ struct file {
uint off; // FD_INODE and FD_DEVICE
short major; // FD_DEVICE
short minor; // FD_DEVICE
struct sleeplock mutex; //FD_MUTEX
};
#define major(dev) ((dev) >> 16 & 0xFFFF)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment