Skip to content
Snippets Groups Projects
Commit 93f98762 authored by Fache Charles's avatar Fache Charles
Browse files

activity 4.3

parent 6cfb2682
No related branches found
Tags tp1-act-3-1
No related merge requests found
No preview for this file type
......@@ -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; // Only useful for 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