From f4084c05441b1966522cbb907622652c1209e1f9 Mon Sep 17 00:00:00 2001 From: John Birrell Date: Wed, 4 Jun 1997 13:03:12 +0000 Subject: [PATCH] Bring back nanosleep from the cold. The addition of the nanosleep syscall was correctly added to libc/sys/Makefile so that it is renamed as _thread_sys_nanosleep(). This syscall is one of those that libc_r has to re-implement because the only behaviour is to block the process. So libc_r just ignores the fact that a nanosleep syscall exists and goes its own way - as it has done all along .... and now it does again. And now a simple program can sleep again. Phew. --- lib/libc_r/uthread/uthread_nanosleep.c | 2 +- lib/libkse/thread/thr_nanosleep.c | 2 +- lib/libpthread/thread/thr_nanosleep.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc_r/uthread/uthread_nanosleep.c b/lib/libc_r/uthread/uthread_nanosleep.c index 7cf734d18662..39c7dadd2232 100644 --- a/lib/libc_r/uthread/uthread_nanosleep.c +++ b/lib/libc_r/uthread/uthread_nanosleep.c @@ -37,7 +37,7 @@ #include "pthread_private.h" int -_thread_nanosleep(const struct timespec * time_to_sleep, +nanosleep(const struct timespec * time_to_sleep, struct timespec * time_remaining) { int ret = 0; diff --git a/lib/libkse/thread/thr_nanosleep.c b/lib/libkse/thread/thr_nanosleep.c index 7cf734d18662..39c7dadd2232 100644 --- a/lib/libkse/thread/thr_nanosleep.c +++ b/lib/libkse/thread/thr_nanosleep.c @@ -37,7 +37,7 @@ #include "pthread_private.h" int -_thread_nanosleep(const struct timespec * time_to_sleep, +nanosleep(const struct timespec * time_to_sleep, struct timespec * time_remaining) { int ret = 0; diff --git a/lib/libpthread/thread/thr_nanosleep.c b/lib/libpthread/thread/thr_nanosleep.c index 7cf734d18662..39c7dadd2232 100644 --- a/lib/libpthread/thread/thr_nanosleep.c +++ b/lib/libpthread/thread/thr_nanosleep.c @@ -37,7 +37,7 @@ #include "pthread_private.h" int -_thread_nanosleep(const struct timespec * time_to_sleep, +nanosleep(const struct timespec * time_to_sleep, struct timespec * time_remaining) { int ret = 0;