ntdll: Use INT_MAX for the semaphore count since LONG_MAX won't work on 64-bit.
authorAlexandre Julliard <julliard@winehq.org>
Wed, 31 Dec 2008 20:55:11 +0000 (21:55 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 31 Dec 2008 20:55:11 +0000 (21:55 +0100)
dlls/ntdll/threadpool.c

index af42b307f38a611fa7cfc07bcf6ad56f9436cdbc..31a1a5605e0b45149a1f0fda9fc695e1e200e7d6 100644 (file)
@@ -148,7 +148,7 @@ static NTSTATUS add_work_item_to_queue(struct work_item *work_item)
     if (!work_item_event)
     {
         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 ))
             NtClose(sem);  /* somebody beat us to it */
     }