ntdll: Use INT_MAX for the semaphore count since LONG_MAX won't work on 64-bit.
This commit is contained in:
parent
5f36d0239f
commit
82ebebc671
|
@ -148,7 +148,7 @@ static NTSTATUS add_work_item_to_queue(struct work_item *work_item)
|
||||||
if (!work_item_event)
|
if (!work_item_event)
|
||||||
{
|
{
|
||||||
HANDLE sem;
|
HANDLE sem;
|
||||||
status = NtCreateSemaphore(&sem, SEMAPHORE_ALL_ACCESS, NULL, 1, LONG_MAX);
|
status = NtCreateSemaphore(&sem, SEMAPHORE_ALL_ACCESS, NULL, 1, INT_MAX);
|
||||||
if (interlocked_cmpxchg_ptr( &work_item_event, sem, 0 ))
|
if (interlocked_cmpxchg_ptr( &work_item_event, sem, 0 ))
|
||||||
NtClose(sem); /* somebody beat us to it */
|
NtClose(sem); /* somebody beat us to it */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue