vfs: advisory locking + flock syscall

This commit is contained in:
Matheus
2025-09-12 00:34:49 -03:00
parent 39ba23f572
commit b6e76f3d1f
14 changed files with 319 additions and 13 deletions
+5
View File
@@ -503,6 +503,10 @@ static int tmpfs_sync(vnode_t *node) {
return 0;
}
static int tmpfs_advlock(vnode_t *node, int op, advlock_t *advlock) {
return vfs_advlock(node, op, advlock);
}
static int tmpfs_lock(vnode_t *node) {
MUTEX_ACQUIRE(&node->lock);
return 0;
@@ -542,6 +546,7 @@ static vops_t vnops = {
.getpage = tmpfs_getpage,
.putpage = tmpfs_putpage,
.sync = tmpfs_sync,
.advlock = tmpfs_advlock,
.lock = tmpfs_lock,
.unlock = tmpfs_unlock
};