We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 96ac07d + 322ba68 commit 3e2dc99Copy full SHA for 3e2dc99
src/shims/lock.c
@@ -231,10 +231,10 @@ _dispatch_sema4_timedwait(_dispatch_sema4_t *sema, dispatch_time_t timeout)
231
struct timespec _timeout;
232
int ret;
233
234
+ uint64_t nsec = _dispatch_time_nanoseconds_since_epoch(timeout);
235
+ _timeout.tv_sec = (__typeof__(_timeout.tv_sec))(nsec / NSEC_PER_SEC);
236
+ _timeout.tv_nsec = (__typeof__(_timeout.tv_nsec))(nsec % NSEC_PER_SEC);
237
do {
- uint64_t nsec = _dispatch_time_nanoseconds_since_epoch(timeout);
- _timeout.tv_sec = (__typeof__(_timeout.tv_sec))(nsec / NSEC_PER_SEC);
- _timeout.tv_nsec = (__typeof__(_timeout.tv_nsec))(nsec % NSEC_PER_SEC);
238
ret = sem_timedwait(sema, &_timeout);
239
} while (unlikely(ret == -1 && errno == EINTR));
240
0 commit comments