mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
file: redo locking
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user