summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/kernel32.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index cb7341295..aa10a192f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
* strfuncs.cc (__set_charset_from_codepage): Fetch current ANSI
diff --git a/winsup/cygwin/kernel32.cc b/winsup/cygwin/kernel32.cc
index 35b879a3c..6af0ddb2e 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))
{