From d6808b435176a96a673d159301d972a939802997 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Sat, 21 Mar 2020 18:12:32 +0900 Subject: [PATCH] core/posixcall: Use sched_sleep() to suspend running task, instead of process_wait(), fix compiler warning --- kernel/core/posixcall.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/core/posixcall.c b/kernel/core/posixcall.c index 2f47e9f..faea3aa 100644 --- a/kernel/core/posixcall.c +++ b/kernel/core/posixcall.c @@ -9,6 +9,7 @@ #include #include #include +#include int sys_sigaction(stack_frame_t*); @@ -312,7 +313,8 @@ int sys_wait(int *status) /* wait for a signal from any process */ dbg_printf("[%u] going to wait\n", self); - ret_val = process_wait(-1); + /* FIXME: Who is going to wake up the task? */ + ret_val = sched_sleep(NULL); /* TODO: Handle the signal */ @@ -417,7 +419,7 @@ int sys_debug(const char *str, const u32_t len) cproc = process_get_current(); ret_val = len < (sizeof(buffer) - 1) ? len : (sizeof(buffer) - 1); - process_memcpy_ptok(cproc, buffer, str, ret_val); + process_memcpy_ptok(cproc, buffer, (void*)str, ret_val); buffer[ret_val] = 0; dbg_printf("%s\n", buffer); -- 2.47.3