sched: apply proper blocking mechanism for chardev
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
This commit is contained in:
parent
86041e90e4
commit
dfed938383
12 changed files with 183 additions and 24 deletions
11
fs/vfs.c
11
fs/vfs.c
|
|
@ -4,6 +4,7 @@
|
|||
#include <kernel/rbtree.h>
|
||||
|
||||
#include <fs/ext2.h>
|
||||
#include <fs/devfs.h>
|
||||
#include <fs/vfs.h>
|
||||
|
||||
#include <lib/stack.h>
|
||||
|
|
@ -243,6 +244,16 @@ char *dirname(char *path)
|
|||
return path;
|
||||
}
|
||||
|
||||
inline uint64_t vfs_file_type(struct file *file)
|
||||
{
|
||||
return file->vnode->flags & VFS_VTYPE_MASK;
|
||||
}
|
||||
|
||||
inline void *vfs_file_dev(struct file *file)
|
||||
{
|
||||
return ((struct devfs_dev_info *)file->vnode->priv_data)->dev;
|
||||
}
|
||||
|
||||
struct vnode *vfs_create_vno()
|
||||
{
|
||||
struct vnode *vnode = slab_alloc(vnode_slab);
|
||||
|
|
|
|||
Loading…
Reference in a new issue