From 4b2d22c03eaaefcb94e9c31dcd52a42c2cce3c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 27 Jan 2003 03:19:18 +0000 Subject: [PATCH] Fixed userland snooze() implementation, snooze_etc() is now also exported (as required by the Be API). Removed all posix signal functionality from the kernel. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2579 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/os/syscalls.S | 2 +- src/kernel/libroot/os/thread.c | 15 +++++++++++---- src/kernel/libroot/posix/signal/Jamfile | 16 ++++++---------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/kernel/libroot/os/syscalls.S b/src/kernel/libroot/os/syscalls.S index 84c13becfb..1a0c017744 100644 --- a/src/kernel/libroot/os/syscalls.S +++ b/src/kernel/libroot/os/syscalls.S @@ -98,7 +98,7 @@ SYSCALL4(sys_spawn_thread, 35) SYSCALL1(sys_kill_thread, 36) SYSCALL1(sys_suspend_thread, 37) SYSCALL1(sys_resume_thread, 38) -SYSCALL3(sys_snooze_until, 17) +SYSCALL4(sys_snooze_etc, 17) SYSCALL4(send_data, 94) SYSCALL3(receive_data, 95) SYSCALL1(has_data, 96) diff --git a/src/kernel/libroot/os/thread.c b/src/kernel/libroot/os/thread.c index ae05f0408a..d9a28ed3c9 100644 --- a/src/kernel/libroot/os/thread.c +++ b/src/kernel/libroot/os/thread.c @@ -133,16 +133,23 @@ has_data(thread_id thread) */ status_t -snooze(bigtime_t microseconds) +snooze_etc(bigtime_t timeout, int timeBase, uint32 flags) { - return sys_snooze_until(sys_system_time() + microseconds, B_SYSTEM_TIMEBASE); + return sys_snooze_etc(timeout, timeBase, flags); } status_t -snooze_until(bigtime_t time, int timeBase) +snooze(bigtime_t timeout) { - return sys_snooze_until(time, timeBase); + return snooze_etc(timeout, B_SYSTEM_TIMEBASE, B_RELATIVE_TIMEOUT); +} + + +status_t +snooze_until(bigtime_t timeout, int timeBase) +{ + return snooze_etc(timeout, timeBase, B_ABSOLUTE_TIMEOUT); } diff --git a/src/kernel/libroot/posix/signal/Jamfile b/src/kernel/libroot/posix/signal/Jamfile index 5066856426..e7b61ee1e5 100644 --- a/src/kernel/libroot/posix/signal/Jamfile +++ b/src/kernel/libroot/posix/signal/Jamfile @@ -11,14 +11,10 @@ KernelMergeObject posix_signal.o : -fPIC -DPIC ; -MergeObjectFromObjects kernel_posix_signal.o : -# <$(SOURCE_GRIST)>raise.o - <$(SOURCE_GRIST)>send_signal.o - <$(SOURCE_GRIST)>sigaction.o - <$(SOURCE_GRIST)>signal.o - <$(SOURCE_GRIST)>sigset.o - <$(SOURCE_GRIST)>strsignal.o - : - -fPIC -DPIC - ; +# there are no files in the kernel + +#MergeObjectFromObjects kernel_posix_signal.o : +# : +# -fPIC -DPIC +# ;