diff options
author | Marvin Borner | 2021-01-09 23:19:53 +0100 |
---|---|---|
committer | Marvin Borner | 2021-01-09 23:19:53 +0100 |
commit | 836294b9232c7d63d26db4f87c32cf1420cd856d (patch) | |
tree | 54f1b28951c53b38dcde5866a74c082c8ef83b0f /kernel/features/proc.c | |
parent | f27a5f8af9fc5a16b80a7d6646e44d718b0efd7d (diff) |
To be continued
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r-- | kernel/features/proc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c index 76da36d..08f3b8e 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -98,14 +98,15 @@ void proc_send(struct proc *src, struct proc *dest, u32 type, void *data) priority_proc = dest; } -struct proc_message *proc_receive(struct proc *proc) +u32 proc_receive(struct proc *proc, struct message *buf) { if (proc->messages && proc->messages->head) { struct proc_message *msg = proc->messages->head->data; list_remove(proc->messages, proc->messages->head); - return msg; + memcpy(buf, msg->msg, sizeof(*buf)); + return 1; } else { - return NULL; + return 0; } } |