file: redo locking

This commit is contained in:
Matheus
2023-07-03 22:51:53 -03:00
parent b657874c4c
commit 032560bda0
11 changed files with 107 additions and 27 deletions
+3
View File
@@ -27,6 +27,9 @@ int fd_close(int fd);
int fd_dup(int oldfd, int newfd, bool exact, int flags, int *ret);
int fd_clone(proc_t *proc);
#define FILE_LOCK(x) MUTEX_ACQUIRE(&(x)->mutex, false)
#define FILE_UNLOCK(x) MUTEX_RELEASE(&(x)->mutex)
#define FILE_READ 1
#define FILE_WRITE 2
#define FILE_KNOWN_FLAGS 3