diff options
author | Marvin Borner | 2021-04-02 01:27:36 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-02 01:27:36 +0200 |
commit | 192b756a6999a0637fcc72f3fd2f9f7099e32543 (patch) | |
tree | f936c42baeb54c8aebd0fc0ac0cb56f9dcf3c96c /kernel/features/fs.c | |
parent | afa00abb2b68205bee539d7947130d6b1b1ec6e9 (diff) |
Huge scheduling/proc-management improvements
Diffstat (limited to 'kernel/features/fs.c')
-rw-r--r-- | kernel/features/fs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/features/fs.c b/kernel/features/fs.c index 753adb4..0ffe80f 100644 --- a/kernel/features/fs.c +++ b/kernel/features/fs.c @@ -233,7 +233,7 @@ res vfs_stat(const char *path, struct stat *buf) return m->dev->vfs->stat(path, buf, m->dev); } -res vfs_wait(const char *path, u32 func_ptr) +res vfs_block(const char *path, u32 func_ptr) { if (!func_ptr || !memory_valid(path)) return -EFAULT; @@ -242,9 +242,9 @@ res vfs_wait(const char *path, u32 func_ptr) if (!m || !m->dev || !m->dev->vfs) return -ENOENT; - // Default wait - if (!m->dev->vfs->wait) { - proc_wait_for(vfs_find_dev(path)->id, PROC_WAIT_DEV, func_ptr); + // Default block + if (!m->dev->vfs->block) { + proc_block(vfs_find_dev(path)->id, PROC_BLOCK_DEV, func_ptr); return EOK; } @@ -252,7 +252,7 @@ res vfs_wait(const char *path, u32 func_ptr) if (len > 1) path += len; - return m->dev->vfs->wait(path, func_ptr, m->dev); + return m->dev->vfs->block(path, func_ptr, m->dev); } res vfs_poll(const char **files) @@ -269,9 +269,9 @@ res vfs_poll(const char **files) } for (const char **p = files; *p && memory_valid(*p) && **p; p++) - vfs_wait(*p, (u32)vfs_poll); + vfs_block(*p, (u32)vfs_poll); - return PROC_MAX_WAIT_IDS + 1; + return PROC_MAX_BLOCK_IDS + 1; } res vfs_ready(const char *path) |