* kernel32.cc (CreateMutexW): Use correct access mask.

(CreateSemaphoreW): Ditto.
This commit is contained in:
Corinna Vinschen 2009-09-24 09:09:45 +00:00
parent c1754722ee
commit 1c23aff7a3
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-09-24 Corinna Vinschen <corinna@vinschen.de>
* kernel32.cc (CreateMutexW): Use correct access mask.
(CreateSemaphoreW): Ditto.
2009-09-23 Corinna Vinschen <corinna@vinschen.de> 2009-09-23 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc (__set_charset_from_codepage): Fetch current ANSI * strfuncs.cc (__set_charset_from_codepage): Fetch current ANSI

View File

@ -131,7 +131,7 @@ CreateMutexW (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner,
lpName ? get_shared_parent_dir () : NULL, lpName ? get_shared_parent_dir () : NULL,
lpMutexAttributes lpMutexAttributes
? lpMutexAttributes->lpSecurityDescriptor : NULL); ? lpMutexAttributes->lpSecurityDescriptor : NULL);
status = NtCreateMutant (&mtx, CYG_EVENT_ACCESS, &attr, bInitialOwner); status = NtCreateMutant (&mtx, CYG_MUTANT_ACCESS, &attr, bInitialOwner);
if (!NT_SUCCESS (status)) if (!NT_SUCCESS (status))
{ {
SetLastError (RtlNtStatusToDosError (status)); SetLastError (RtlNtStatusToDosError (status));
@ -222,7 +222,7 @@ CreateSemaphoreW (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
lpSemaphoreAttributes lpSemaphoreAttributes
? lpSemaphoreAttributes->lpSecurityDescriptor ? lpSemaphoreAttributes->lpSecurityDescriptor
: NULL); : NULL);
status = NtCreateSemaphore (&sem, CYG_EVENT_ACCESS, &attr, status = NtCreateSemaphore (&sem, CYG_SEMAPHORE_ACCESS, &attr,
lInitialCount, lMaximumCount); lInitialCount, lMaximumCount);
if (!NT_SUCCESS (status)) if (!NT_SUCCESS (status))
{ {