aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2021-01-15 16:34:19 +0100
committerMarvin Borner2021-01-15 16:34:19 +0100
commit41cba1de51b328979ff2d0261b4141bb4e128fe6 (patch)
tree88ea7bda9e7a675ed0e043ea8662ea9cf3767ce3 /kernel/inc
parentd3924f541f36bc08fed87f25ec7fc6e64b86e511 (diff)
Implemented basic dev ready-state waiting
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/fs.h2
-rw-r--r--kernel/inc/proc.h2
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