1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Make usleep() overridable by the thread libraries so they can provide

cancellation points.

Noticed by:	phk
This commit is contained in:
Daniel Eischen 2005-08-03 00:44:25 +00:00
parent 78956f2474
commit 8450917472
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148656

View File

@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
#include "un-namespace.h" #include "un-namespace.h"
int int
usleep(useconds) __usleep(useconds)
useconds_t useconds; useconds_t useconds;
{ {
struct timespec time_to_sleep; struct timespec time_to_sleep;
@ -52,3 +52,6 @@ usleep(useconds)
time_to_sleep.tv_sec = useconds / 1000000; time_to_sleep.tv_sec = useconds / 1000000;
return (_nanosleep(&time_to_sleep, NULL)); return (_nanosleep(&time_to_sleep, NULL));
} }
__weak_reference(__usleep, usleep);
__weak_reference(__usleep, _usleep);