Make usleep() overridable by the thread libraries so they can provide
cancellation points. Noticed by: phk
This commit is contained in:
parent
78956f2474
commit
8450917472
@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "un-namespace.h"
|
||||
|
||||
int
|
||||
usleep(useconds)
|
||||
__usleep(useconds)
|
||||
useconds_t useconds;
|
||||
{
|
||||
struct timespec time_to_sleep;
|
||||
@ -52,3 +52,6 @@ usleep(useconds)
|
||||
time_to_sleep.tv_sec = useconds / 1000000;
|
||||
return (_nanosleep(&time_to_sleep, NULL));
|
||||
}
|
||||
|
||||
__weak_reference(__usleep, usleep);
|
||||
__weak_reference(__usleep, _usleep);
|
||||
|
Loading…
x
Reference in New Issue
Block a user