From a4e6a12f0bea9fa1382bf86346ea0762331fd535 Mon Sep 17 00:00:00 2001 From: corinna Date: Thu, 24 Sep 2009 09:09:45 +0000 Subject: [PATCH] * kernel32.cc (CreateMutexW): Use correct access mask. (CreateSemaphoreW): Ditto. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/kernel32.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index cb7341295a..aa10a192fa 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-09-24 Corinna Vinschen + + * kernel32.cc (CreateMutexW): Use correct access mask. + (CreateSemaphoreW): Ditto. + 2009-09-23 Corinna Vinschen * strfuncs.cc (__set_charset_from_codepage): Fetch current ANSI diff --git a/winsup/cygwin/kernel32.cc b/winsup/cygwin/kernel32.cc index 35b879a3c0..6af0ddb2e3 100644 --- a/winsup/cygwin/kernel32.cc +++ b/winsup/cygwin/kernel32.cc @@ -131,7 +131,7 @@ CreateMutexW (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, lpName ? get_shared_parent_dir () : NULL, lpMutexAttributes ? lpMutexAttributes->lpSecurityDescriptor : NULL); - status = NtCreateMutant (&mtx, CYG_EVENT_ACCESS, &attr, bInitialOwner); + status = NtCreateMutant (&mtx, CYG_MUTANT_ACCESS, &attr, bInitialOwner); if (!NT_SUCCESS (status)) { SetLastError (RtlNtStatusToDosError (status)); @@ -222,7 +222,7 @@ CreateSemaphoreW (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, lpSemaphoreAttributes ? lpSemaphoreAttributes->lpSecurityDescriptor : NULL); - status = NtCreateSemaphore (&sem, CYG_EVENT_ACCESS, &attr, + status = NtCreateSemaphore (&sem, CYG_SEMAPHORE_ACCESS, &attr, lInitialCount, lMaximumCount); if (!NT_SUCCESS (status)) { -- 2.11.0