aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2021-02-09 23:57:01 +0100
committerMarvin Borner2021-02-09 23:57:01 +0100
commitedc570a3552a7fdaaf89962e5374d98c2b3dfaa0 (patch)
treef8ad7ec20425b7e3a1d9df07429609e9f608bc19 /kernel/inc
parent58b4e00736c0f2f13a3e96b5fcb3c00623ed35be (diff)
Added basic streams
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/proc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index 0007744..9f78a3e 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -19,6 +19,11 @@
#define PROC_MAX_WAIT_IDS 16
+#define STREAM_IN 0
+#define STREAM_OUT 1
+#define STREAM_ERR 2
+#define STREAM_LOG 3
+
enum proc_state { PROC_RUNNING, PROC_SLEEPING };
enum proc_wait_type { PROC_WAIT_DEV };
@@ -29,10 +34,17 @@ struct proc_wait {
s32 (*func)();
};
+struct stream {
+ u32 offset;
+ u32 pos;
+ char data[4096];
+};
+
struct proc {
u32 pid;
u8 super;
char name[32];
+ struct stream streams[4];
struct regs regs;
struct proc_wait wait; // dev_id
enum proc_state state;