mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04: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
1 changed files with 4 additions and 1 deletions
|
|
@ -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 a new issue