Kernel/LibC: Implement flock

This commit is contained in:
2025-06-25 18:46:20 +03:00
parent 0cbc39698c
commit 93e5d09a63
8 changed files with 120 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#ifndef _SYS_FILE_H
#define _SYS_FILE_H 1
#include <sys/cdefs.h>
__BEGIN_DECLS
#define LOCK_UN 0
#define LOCK_EX 1
#define LOCK_SH 2
#define LOCK_NB 4
int flock(int fd, int op);
__END_DECLS
#endif

View File

@@ -107,6 +107,7 @@ __BEGIN_DECLS
O(SYS_EPOLL_CREATE1, epoll_create1) \
O(SYS_EPOLL_CTL, epoll_ctl) \
O(SYS_EPOLL_PWAIT2, epoll_pwait2) \
O(SYS_FLOCK, flock) \
enum Syscall
{