Commit in reactos/lib/kernel32/synch on MAIN
mutex.c+15-81.9 -> 1.10
sem.c+14-81.9 -> 1.10
timer.c+3-81.17 -> 1.18
+32-24
3 modified files
minor fixes

reactos/lib/kernel32/synch
mutex.c 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- mutex.c	24 Oct 2004 12:16:54 -0000	1.9
+++ mutex.c	24 Oct 2004 12:26:26 -0000	1.10
@@ -1,4 +1,4 @@
-/* $Id: mutex.c,v 1.9 2004/10/24 12:16:54 weiden Exp $
+/* $Id: mutex.c,v 1.10 2004/10/24 12:26:26 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -31,17 +31,24 @@
    ANSI_STRING Name;
    HANDLE Handle;
 
-   RtlInitAnsiString(&Name,
-		     (LPSTR)lpName);
-   RtlAnsiStringToUnicodeString(&NameU,
-				&Name,
-				TRUE);
+   if (lpName != NULL)
+     {
+        RtlInitAnsiString(&Name,
+                          (LPSTR)lpName);
+
+        RtlAnsiStringToUnicodeString(&NameU,
+                                     &Name,
+                                     TRUE);
+     }
 
    Handle = CreateMutexW(lpMutexAttributes,
 			 bInitialOwner,
-			 NameU.Buffer);
+			 (lpName ? NameU.Buffer : NULL));
 
-   RtlFreeUnicodeString(&NameU);
+   if (lpName != NULL)
+     {
+        RtlFreeUnicodeString(&NameU);
+     }
 
    return Handle;
 }

reactos/lib/kernel32/synch
sem.c 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- sem.c	24 Oct 2004 12:16:54 -0000	1.9
+++ sem.c	24 Oct 2004 12:26:27 -0000	1.10
@@ -1,4 +1,4 @@
-/* $Id: sem.c,v 1.9 2004/10/24 12:16:54 weiden Exp $
+/* $Id: sem.c,v 1.10 2004/10/24 12:26:27 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -32,18 +32,24 @@
    ANSI_STRING Name;
    HANDLE Handle;
 
-   RtlInitAnsiString(&Name,
-		     (LPSTR)lpName);
-   RtlAnsiStringToUnicodeString(&NameU,
-				&Name,
-				TRUE);
+   if (lpName != NULL)
+     {
+        RtlInitAnsiString(&Name,
+                          (LPSTR)lpName);
+        RtlAnsiStringToUnicodeString(&NameU,
+                                     &Name,
+                                     TRUE);
+     }
 
    Handle = CreateSemaphoreW(lpSemaphoreAttributes,
 			     lInitialCount,
 			     lMaximumCount,
-			     NameU.Buffer);
+			     (lpName ? NameU.Buffer : NULL));
 
-   RtlFreeUnicodeString (&NameU);
+   if (lpName != NULL)
+     {
+        RtlFreeUnicodeString (&NameU);
+     }
 
    return Handle;
 }

reactos/lib/kernel32/synch
timer.c 1.17 -> 1.18
diff -u -r1.17 -r1.18
--- timer.c	24 Oct 2004 12:16:54 -0000	1.17
+++ timer.c	24 Oct 2004 12:26:27 -0000	1.18
@@ -1,4 +1,4 @@
-/* $Id: timer.c,v 1.17 2004/10/24 12:16:54 weiden Exp $
+/* $Id: timer.c,v 1.18 2004/10/24 12:26:27 weiden Exp $
  *
  * COPYRIGHT:            See COPYING in the top level directory
  * PROJECT:              ReactOS kernel
@@ -29,17 +29,12 @@
    HANDLE TimerHandle;
    OBJECT_ATTRIBUTES ObjectAttributes;
    UNICODE_STRING UnicodeName;
-   ULONG TimerType;
-   
-   if (bManualReset)
-     TimerType = NotificationTimer;
-   else
-     TimerType = SynchronizationTimer;
 
    if (lpTimerName)
      {
        RtlInitUnicodeString(&UnicodeName, lpTimerName);
      }
+
    InitializeObjectAttributes(&ObjectAttributes,
 			      (lpTimerName ? &UnicodeName : NULL),
 			      0,
@@ -58,7 +53,7 @@
    Status = NtCreateTimer(&TimerHandle,
 			  TIMER_ALL_ACCESS,
 			  &ObjectAttributes,
-			  TimerType);
+			  (bManualReset ? NotificationTimer : SynchronizationTimer));
    if (!NT_SUCCESS(Status))
      {
 	SetLastErrorByStatus(Status);
CVSspam 0.2.8