Skip to content

Commit dd6d93a

Browse files
committed
shims: correct indirection on Windows
The `_dispatch_sema4_t` type is a pointer to the handle of the semaphore, so we need to indirect through the pointer before using it. This site was incorrectly using it directly.
1 parent d44acc0 commit dd6d93a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ _dispatch_sema4_timedwait(_dispatch_sema4_t *sema, dispatch_time_t timeout)
308308
nsec = _dispatch_timeout(timeout);
309309
msec = (DWORD)(nsec / (uint64_t)1000000);
310310
resolution = _push_timer_resolution(msec);
311-
wait_result = WaitForSingleObject(sema, msec);
311+
wait_result = WaitForSingleObject(*sema, msec);
312312
_pop_timer_resolution(resolution);
313313
return wait_result == WAIT_TIMEOUT;
314314
}

0 commit comments

Comments
 (0)