diff options
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; } } |