From 1287f9dfe987f0456e4fb0741385d5f0278ef53b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 14 Feb 2021 17:07:29 +0100 Subject: Message waiting and more! --- kernel/inc/proc.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'kernel/inc/proc.h') diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h index 593141b..cb583d6 100644 --- a/kernel/inc/proc.h +++ b/kernel/inc/proc.h @@ -17,21 +17,27 @@ #define GDT_USER_CODE_OFFSET 0x1b // User code segment offset in GDT (with ring3 mask) #define GDT_USER_DATA_OFFSET 0x23 // User data segment offset in GDT (with ring3 mask) -#define PROC_MAX_WAIT_IDS 16 +#define PROC_MAX_WAIT_IDS 128 +#define PROC_WAIT_MAGIC 0x00528491 #define STREAM_MAX_SIZE 4096 enum stream_defaults { STREAM_IN, STREAM_OUT, STREAM_ERR, STREAM_LOG, STREAM_UNKNOWN = -1 }; enum proc_state { PROC_RUNNING, PROC_SLEEPING }; -enum proc_wait_type { PROC_WAIT_DEV }; +enum proc_wait_type { PROC_WAIT_DEV, PROC_WAIT_MSG }; -struct proc_wait { +struct proc_wait_identifier { + u32 magic; + u32 id; enum proc_wait_type type; - u32 ids[PROC_MAX_WAIT_IDS]; // dev_id - u32 id_cnt; s32 (*func)(); }; +struct proc_wait { + struct proc_wait_identifier ids[PROC_MAX_WAIT_IDS]; // dev_id + u32 id_cnt; +}; + struct stream { u32 offset_read; u32 offset_write; -- cgit v1.2.3