Differences From Artifact [0049adfd9b]:
- File src/OFThread.m — part of check-in [a4986b3356] at 2014-03-05 00:15:40 on branch trunk — OFThread.m: Fix missing define for PSP (user: js, size: 7691) [annotate] [blame] [check-ins using]
To Artifact [21b3bcf0e5]:
- File
src/OFThread.m
— part of check-in
[82b11a2992]
at
2014-04-08 18:48:57
on branch trunk
— Partly revert 4a8704e
This actually caused more trouble than it fixed. The real reason was
that _POSIX_TIMERS wasn't defined and thus nanosleep() would not be
declared by time.h. libogc however also provides nanosleep(), but an
incompatible one that we don't really want. So after _POSIX_TIMERS has
been defined, it would actually conflict, as both declarations would be
used then. This removes the special handling for Wii and uses the
nanosleep() from time.h, which has a declaration that is compatible with
POSIX. (user: js, size: 7486) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
33 34 35 36 37 38 39 | # include <sched.h> #endif #if defined(OF_HAVE_THREADS) && defined(__HAIKU__) # include <kernel/OS.h> #endif | < < < < < < < < | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # include <sched.h> #endif #if defined(OF_HAVE_THREADS) && defined(__HAIKU__) # include <kernel/OS.h> #endif #import "OFThread.h" #import "OFThread+Private.h" #import "OFRunLoop.h" #import "OFList.h" #import "OFDate.h" #import "OFDictionary.h" #import "OFAutoreleasePool.h" |
︙ | ︙ | |||
198 199 200 201 202 203 204 | rqtp.tv_sec = (time_t)timeInterval; rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000); if (rqtp.tv_sec != floor(timeInterval)) @throw [OFOutOfRangeException exception]; | < < < < < | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | rqtp.tv_sec = (time_t)timeInterval; rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000); if (rqtp.tv_sec != floor(timeInterval)) @throw [OFOutOfRangeException exception]; nanosleep(&rqtp, NULL); #else if (timeInterval > UINT_MAX) @throw [OFOutOfRangeException exception]; sleep((unsigned int)timeInterval); usleep((useconds_t)lrint( (timeInterval - floor(timeInterval)) * 1000000)); |
︙ | ︙ |