mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148656
@ -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…
Reference in New Issue
Block a user