Modified: trunk/src/semaphore.c (138 => 139)
--- trunk/src/semaphore.c 2009-11-05 10:34:37 UTC (rev 138)
+++ trunk/src/semaphore.c 2009-11-05 15:15:18 UTC (rev 139)
@@ -155,12 +155,12 @@
#if USE_MACH_SEM
mach_timespec_t _timeout;
kern_return_t kr;
+ uint64_t nsec;
#endif
#if USE_POSIX_SEM
struct timespec _timeout;
int ret;
#endif
- uint64_t nsec;
long orig;
again:
@@ -440,12 +440,12 @@
#if USE_MACH_SEM
mach_timespec_t _timeout;
kern_return_t kr;
+ uint64_t nsec;
#endif
#if USE_POSIX_SEM
struct timespec _timeout;
int ret;
#endif
- uint64_t nsec;
long orig;
again:
@@ -494,7 +494,8 @@
ret = slowpath(sem_timedwait(&dsema->dsema_sem,
&_timeout));
} while (ret == -1 && errno == EINTR);
- if (ret == 0 || errno != ETIMEDOUT) {
+
+ if (!(ret == -1 && errno == ETIMEDOUT)) {
DISPATCH_SEMAPHORE_VERIFY_RET(ret);
break;
}