aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMarvin Borner2021-02-16 22:33:42 +0100
committerMarvin Borner2021-02-16 22:33:42 +0100
commit392b0ff1fcc52c189f131c71ea2a969d1b8c5690 (patch)
tree22cc9e27c09cb9887ca6972e07602070cda25451 /kernel
parent1287f9dfe987f0456e4fb0741385d5f0278ef53b (diff)
Okay!
Diffstat (limited to 'kernel')
-rw-r--r--kernel/features/proc.c2
-rw-r--r--kernel/inc/proc.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index fdf509c..74fa5d4 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -341,7 +341,7 @@ s32 procfs_read(const char *path, void *buf, u32 offset, u32 count, struct devic
return count;
} else if (!memcmp(path, "msg", 4)) {
if (stack_empty(p->messages)) {
- return 0; // This shouldn't happen
+ return -1; // This shouldn't happen
} else {
u8 *msg = stack_pop(p->messages);
if (!msg)
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index cb583d6..a727210 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -17,7 +17,7 @@
#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 128
+#define PROC_MAX_WAIT_IDS 16
#define PROC_WAIT_MAGIC 0x00528491
#define STREAM_MAX_SIZE 4096
@@ -34,7 +34,7 @@ struct proc_wait_identifier {
};
struct proc_wait {
- struct proc_wait_identifier ids[PROC_MAX_WAIT_IDS]; // dev_id
+ struct proc_wait_identifier ids[PROC_MAX_WAIT_IDS];
u32 id_cnt;
};