This commit is contained in:
Dave Murphy 2018-06-13 00:12:26 +00:00 committed by GitHub
commit cbba9e30f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,9 +111,9 @@ int __libnx_gtod(struct _reent *ptr, struct timeval *tp, struct timezone *tz) {
return 0;
}
int usleep(useconds_t useconds)
{
svcSleepThread(useconds * 1000ull);
int __libnx_nanosleep(const struct timespec *req, struct timespec *rem) {
svcSleepThread(req->tv_sec * 1000000000ull + req->tv_nsec);
return 0;
}
@ -127,6 +127,8 @@ void newlibSetup(void) {
__syscalls.clock_getres = __libnx_clock_getres;
__syscalls.clock_settime = __libnx_clock_settime;
__syscalls.nanosleep = __libnx_nanosleep;
// Register locking syscalls
__syscalls.lock_init = mutexInit;