diff options
author | Marvin Borner | 2021-01-15 16:34:19 +0100 |
---|---|---|
committer | Marvin Borner | 2021-01-15 16:34:19 +0100 |
commit | 41cba1de51b328979ff2d0261b4141bb4e128fe6 (patch) | |
tree | 88ea7bda9e7a675ed0e043ea8662ea9cf3767ce3 /kernel/inc | |
parent | d3924f541f36bc08fed87f25ec7fc6e64b86e511 (diff) |
Implemented basic dev ready-state waiting
Diffstat (limited to 'kernel/inc')
-rw-r--r-- | kernel/inc/fs.h | 2 | ||||
-rw-r--r-- | kernel/inc/proc.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/kernel/inc/fs.h b/kernel/inc/fs.h index 1b2b073..e5c444c 100644 --- a/kernel/inc/fs.h +++ b/kernel/inc/fs.h @@ -52,6 +52,8 @@ void vfs_install(void); u32 vfs_mounted(struct device *dev, const char *path); u32 vfs_mount(struct device *dev, const char *path); +struct device *vfs_find_dev(const char *path); + u32 vfs_read(const char *path, void *buf, u32 offset, u32 count); u32 vfs_write(const char *path, void *buf, u32 offset, u32 count); u32 vfs_stat(const char *path, struct stat *buf); diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h index c198b19..75978e9 100644 --- a/kernel/inc/proc.h +++ b/kernel/inc/proc.h @@ -25,6 +25,7 @@ struct proc { struct regs regs; struct regs regs_backup; enum proc_state state; + u32 waits_for; // dev_id struct stack *messages; }; @@ -35,6 +36,7 @@ struct proc *proc_current(void); struct proc *proc_from_pid(u32 pid); void proc_exit(struct proc *proc, int status); void proc_yield(struct regs *r); +void proc_enable_waiting(u32 dev_id); struct proc *proc_make(void); #endif |