Commit in reactos on MAIN
drivers/dd/ramdrv/ramdrv.c+1-11.13 -> 1.14
include/ntos/zw.h+13-131.30 -> 1.31
lib/kernel32/synch/event.c+6-121.19 -> 1.20
ntoskrnl/io/event.c+3-31.8 -> 1.9
ntoskrnl/ke/main.c+2-21.201 -> 1.202
ntoskrnl/nt/ntevent.c+23-281.34 -> 1.35
ntoskrnl/se/semgr.c+2-21.48 -> 1.49
subsys/smss/init.c+2-21.55 -> 1.56
w32api/include/ddk/ntifs.h+3-31.6 -> 1.7
                  /winddk.h+6-61.16 -> 1.17
+61-72
10 modified files
fixed prototypes of NtSetEvent(), NtResetEvent(), NtQueryEvent(), NtPulseEvent(), NtOpenEvent() and NtCreateEvent()

reactos/drivers/dd/ramdrv
ramdrv.c 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- ramdrv.c	10 Feb 2004 16:22:55 -0000	1.13
+++ ramdrv.c	24 Oct 2004 15:26:13 -0000	1.14
@@ -160,7 +160,7 @@
   Status = NtCreateEvent( &event,
 			  0,
 			  &objattr,
-			  TRUE,
+			  NotificationEvent,
 			  FALSE );
   if( !NT_SUCCESS( Status ) )
     {

reactos/include/ntos
zw.h 1.30 -> 1.31
diff -u -r1.30 -r1.31
--- zw.h	21 Aug 2004 13:20:25 -0000	1.30
+++ zw.h	24 Oct 2004 15:26:13 -0000	1.31
@@ -1,5 +1,5 @@
 
-/* $Id: zw.h,v 1.30 2004/08/21 13:20:25 tamlin Exp $
+/* $Id: zw.h,v 1.31 2004/10/24 15:26:13 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -533,8 +533,8 @@
 NtCreateEvent(
 	OUT PHANDLE EventHandle,
 	IN ACCESS_MASK DesiredAccess,
-	IN POBJECT_ATTRIBUTES ObjectAttributes,
-	IN BOOLEAN ManualReset,
+	IN POBJECT_ATTRIBUTES ObjectAttributes  OPTIONAL,
+	IN EVENT_TYPE EventType,
 	IN BOOLEAN InitialState
 	);
 
@@ -543,8 +543,8 @@
 ZwCreateEvent(
 	OUT PHANDLE EventHandle,
 	IN ACCESS_MASK DesiredAccess,
-	IN POBJECT_ATTRIBUTES ObjectAttributes,
-	IN BOOLEAN ManualReset,
+	IN POBJECT_ATTRIBUTES ObjectAttributes  OPTIONAL,
+	IN EVENT_TYPE EventType,
 	IN BOOLEAN InitialState
 	);
 
@@ -2443,14 +2443,14 @@
 STDCALL
 NtPulseEvent(
 	IN HANDLE EventHandle,
-	IN PULONG PulseCount OPTIONAL
+	OUT PLONG PreviousState OPTIONAL
 	);
 
 NTSTATUS
 STDCALL
 ZwPulseEvent(
 	IN HANDLE EventHandle,
-	IN PULONG PulseCount OPTIONAL
+	OUT PLONG PreviousState OPTIONAL
 	);
 
 /*
@@ -2659,7 +2659,7 @@
 	IN EVENT_INFORMATION_CLASS EventInformationClass,
 	OUT PVOID EventInformation,
 	IN ULONG EventInformationLength,
-	OUT PULONG ReturnLength
+	OUT PULONG ReturnLength  OPTIONAL
 	);
 NTSTATUS
 STDCALL
@@ -2668,7 +2668,7 @@
 	IN EVENT_INFORMATION_CLASS EventInformationClass,
 	OUT PVOID EventInformation,
 	IN ULONG EventInformationLength,
-	OUT PULONG ReturnLength
+	OUT PULONG ReturnLength  OPTIONAL
 	);
 
 NTSTATUS STDCALL
@@ -3668,13 +3668,13 @@
 STDCALL
 NtResetEvent(
 	HANDLE EventHandle,
-	PULONG NumberOfWaitingThreads OPTIONAL
+	OUT PLONG PreviousState OPTIONAL
 	);
 NTSTATUS
 STDCALL
 ZwResetEvent(
 	HANDLE EventHandle,
-	PULONG NumberOfWaitingThreads OPTIONAL
+	OUT PLONG PreviousState OPTIONAL
 	);
 //draft
 NTSTATUS
@@ -3899,14 +3899,14 @@
 STDCALL
 NtSetEvent(
 	IN HANDLE EventHandle,
-	PULONG NumberOfThreadsReleased
+	OUT PLONG PreviousState  OPTIONAL
 	);
 
 NTSTATUS
 STDCALL
 ZwSetEvent(
 	IN HANDLE EventHandle,
-	PULONG NumberOfThreadsReleased
+	OUT PLONG PreviousState  OPTIONAL
 	);
 
 /*

reactos/lib/kernel32/synch
event.c 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- event.c	24 Oct 2004 12:16:54 -0000	1.19
+++ event.c	24 Oct 2004 15:26:14 -0000	1.20
@@ -1,4 +1,4 @@
-/* $Id: event.c,v 1.19 2004/10/24 12:16:54 weiden Exp $
+/* $Id: event.c,v 1.20 2004/10/24 15:26:14 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -90,9 +90,9 @@
      }
 
    Status = NtCreateEvent(&hEvent,
-			  STANDARD_RIGHTS_ALL|EVENT_READ_ACCESS|EVENT_WRITE_ACCESS,
+			  STANDARD_RIGHTS_ALL | EVENT_READ_ACCESS | EVENT_WRITE_ACCESS,
 			  &ObjectAttributes,
-			  bManualReset,
+			  (bManualReset ? NotificationEvent : SynchronizationEvent),
 			  bInitialState);
    DPRINT( "Called\n" );
    if (!NT_SUCCESS(Status))
@@ -188,11 +188,9 @@
 BOOL STDCALL
 PulseEvent(HANDLE hEvent)
 {
-   ULONG Count;
    NTSTATUS Status;
 
-   Status = NtPulseEvent(hEvent,
-			 &Count);
+   Status = NtPulseEvent(hEvent, NULL);
    if (!NT_SUCCESS(Status))
      {
 	SetLastErrorByStatus (Status);
@@ -210,10 +208,8 @@
 ResetEvent(HANDLE hEvent)
 {
    NTSTATUS Status;
-   ULONG Count;
 
-   Status = NtResetEvent(hEvent,
-			 &Count);
+   Status = NtClearEvent(hEvent);
    if (!NT_SUCCESS(Status))
      {
 	SetLastErrorByStatus(Status);
@@ -231,10 +227,8 @@
 SetEvent(HANDLE hEvent)
 {
    NTSTATUS Status;
-   ULONG Count;
 
-   Status = NtSetEvent(hEvent,
-		       &Count);
+   Status = NtSetEvent(hEvent, NULL);
    if (!NT_SUCCESS(Status))
      {
 	SetLastErrorByStatus(Status);

reactos/ntoskrnl/io
event.c 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- event.c	15 Aug 2004 16:39:03 -0000	1.8
+++ event.c	24 Oct 2004 15:26:14 -0000	1.9
@@ -1,4 +1,4 @@
-/* $Id: event.c,v 1.8 2004/08/15 16:39:03 chorns Exp $
+/* $Id: event.c,v 1.9 2004/10/24 15:26:14 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -37,7 +37,7 @@
    Status = NtCreateEvent(&Handle,
 			  EVENT_ALL_ACCESS,
 			  &ObjectAttributes,
-			  FALSE,
+			  NotificationEvent,
 			  TRUE);
    if (!NT_SUCCESS(Status))
      {
@@ -78,7 +78,7 @@
    Status = NtCreateEvent(&Handle,
 			  EVENT_ALL_ACCESS,
 			  &ObjectAttributes,
-			  TRUE,
+			  SynchronizationEvent,
 			  TRUE);
    if (!NT_SUCCESS(Status))
      {

reactos/ntoskrnl/ke
main.c 1.201 -> 1.202
diff -u -r1.201 -r1.202
--- main.c	24 Oct 2004 12:00:01 -0000	1.201
+++ main.c	24 Oct 2004 15:26:14 -0000	1.202
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: main.c,v 1.201 2004/10/24 12:00:01 ekohl Exp $
+/* $Id: main.c,v 1.202 2004/10/24 15:26:14 weiden Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/ke/main.c
@@ -746,7 +746,7 @@
   Status = NtCreateEvent(&InitDoneEventHandle,
     EVENT_ALL_ACCESS,
     &ObjectAttributes,
-    FALSE,              /* Synchronization event */
+    SynchronizationEvent,
     FALSE);             /* Not signalled */
   if (!NT_SUCCESS(Status))
     {

reactos/ntoskrnl/nt
ntevent.c 1.34 -> 1.35
diff -u -r1.34 -r1.35
--- ntevent.c	15 Aug 2004 16:39:09 -0000	1.34
+++ ntevent.c	24 Oct 2004 15:26:14 -0000	1.35
@@ -118,21 +118,20 @@
  * @implemented
  */
 NTSTATUS STDCALL
-NtCreateEvent(OUT PHANDLE UnsafeEventHandle,
+NtCreateEvent(OUT PHANDLE EventHandle,
 	      IN ACCESS_MASK DesiredAccess,
-	      IN POBJECT_ATTRIBUTES UnsafeObjectAttributes,
-	      IN BOOLEAN ManualReset,
+	      IN POBJECT_ATTRIBUTES ObjectAttributes  OPTIONAL,
+	      IN EVENT_TYPE EventType,
 	      IN BOOLEAN InitialState)
 {
    PKEVENT Event;
-   HANDLE EventHandle;
+   HANDLE hEvent;
    NTSTATUS Status;
    OBJECT_ATTRIBUTES SafeObjectAttributes;
-   POBJECT_ATTRIBUTES ObjectAttributes;
    
-   if (UnsafeObjectAttributes != NULL)
+   if (ObjectAttributes != NULL)
      {
-       Status = MmCopyFromCaller(&SafeObjectAttributes, UnsafeObjectAttributes,
+       Status = MmCopyFromCaller(&SafeObjectAttributes, ObjectAttributes,
 				 sizeof(OBJECT_ATTRIBUTES));
        if (!NT_SUCCESS(Status))
 	 {
@@ -140,10 +139,6 @@
 	 }
        ObjectAttributes = &SafeObjectAttributes;
      }
-   else
-     {
-       ObjectAttributes = NULL;
-     }
 
    Status = ObCreateObject(ExGetPreviousMode(),
 			   ExEventObjectType,
@@ -159,7 +154,7 @@
 	return(Status);
      }
    KeInitializeEvent(Event,
-		     ManualReset ? NotificationEvent : SynchronizationEvent,
+		     EventType,
 		     InitialState);
 
    Status = ObInsertObject ((PVOID)Event,
@@ -167,17 +162,17 @@
 			    DesiredAccess,
 			    0,
 			    NULL,
-			    &EventHandle);
+			    &hEvent);
    ObDereferenceObject(Event);
    if (!NT_SUCCESS(Status))
      {
 	return Status;
      }
 
-   Status = MmCopyToCaller(UnsafeEventHandle, &EventHandle, sizeof(HANDLE));
+   Status = MmCopyToCaller(EventHandle, &hEvent, sizeof(HANDLE));
    if (!NT_SUCCESS(Status))
      {
-	ZwClose(EventHandle);
+	ZwClose(hEvent);
 	return(Status);
      }
    return(STATUS_SUCCESS);
@@ -185,12 +180,12 @@
 
 
 NTSTATUS STDCALL
-NtOpenEvent(OUT PHANDLE UnsafeEventHandle,
+NtOpenEvent(OUT PHANDLE EventHandle,
 	    IN ACCESS_MASK DesiredAccess,
 	    IN POBJECT_ATTRIBUTES ObjectAttributes)
 {
    NTSTATUS Status;
-   HANDLE EventHandle;
+   HANDLE hEvent;
 
    DPRINT("ObjectName '%wZ'\n", ObjectAttributes->ObjectName);
 
@@ -200,14 +195,14 @@
 			       UserMode,
 			       DesiredAccess,
 			       NULL,
-			       &EventHandle);
+			       &hEvent);
              
   if (!NT_SUCCESS(Status))
   {
     return(Status);
   }
 
-   Status = MmCopyToCaller(UnsafeEventHandle, &EventHandle, sizeof(HANDLE));
+   Status = MmCopyToCaller(EventHandle, &hEvent, sizeof(HANDLE));
    if (!NT_SUCCESS(Status))
      {
        ZwClose(EventHandle);
@@ -220,7 +215,7 @@
 
 NTSTATUS STDCALL
 NtPulseEvent(IN HANDLE EventHandle,
-	     IN PULONG UnsafePulseCount OPTIONAL)
+	     OUT PLONG PreviousState  OPTIONAL)
 {
    PKEVENT Event;
    NTSTATUS Status;
@@ -249,14 +244,14 @@
 NTSTATUS STDCALL
 NtQueryEvent(IN HANDLE EventHandle,
 	     IN EVENT_INFORMATION_CLASS EventInformationClass,
-	     OUT PVOID UnsafeEventInformation,
+	     OUT PVOID EventInformation,
 	     IN ULONG EventInformationLength,
-	     OUT PULONG UnsafeReturnLength)
+	     OUT PULONG ReturnLength  OPTIONAL)
 {
    EVENT_BASIC_INFORMATION Info;
    PKEVENT Event;
    NTSTATUS Status;
-   ULONG ReturnLength;
+   ULONG RetLen;
 
    if (EventInformationClass > EventBasicInformation)
      return STATUS_INVALID_INFO_CLASS;
@@ -279,7 +274,7 @@
      Info.EventType = SynchronizationEvent;
    Info.EventState = KeReadStateEvent(Event);
 
-   Status = MmCopyToCaller(UnsafeEventInformation, &Event, 
+   Status = MmCopyToCaller(EventInformation, &Event,
 			   sizeof(EVENT_BASIC_INFORMATION));
    if (!NT_SUCCESS(Status))
      {
@@ -287,8 +282,8 @@
        return(Status);
      }
 
-   ReturnLength = sizeof(EVENT_BASIC_INFORMATION);
-   Status = MmCopyToCaller(UnsafeReturnLength, &ReturnLength, sizeof(ULONG));
+   RetLen = sizeof(EVENT_BASIC_INFORMATION);
+   Status = MmCopyToCaller(ReturnLength, &RetLen, sizeof(ULONG));
    if (!NT_SUCCESS(Status))
      {
        ObDereferenceObject(Event);
@@ -303,7 +298,7 @@
 
 NTSTATUS STDCALL
 NtResetEvent(IN HANDLE EventHandle,
-	     OUT PULONG UnsafeNumberOfWaitingThreads OPTIONAL)
+	     OUT PLONG PreviousState  OPTIONAL)
 {
    PKEVENT Event;
    NTSTATUS Status;
@@ -331,7 +326,7 @@
  */
 NTSTATUS STDCALL
 NtSetEvent(IN HANDLE EventHandle,
-	   OUT PULONG UnsafeNumberOfThreadsReleased)
+	   OUT PLONG PreviousState  OPTIONAL)
 {
    PKEVENT Event;
    NTSTATUS Status;

reactos/ntoskrnl/se
semgr.c 1.48 -> 1.49
diff -u -r1.48 -r1.49
--- semgr.c	22 Oct 2004 20:48:00 -0000	1.48
+++ semgr.c	24 Oct 2004 15:26:14 -0000	1.49
@@ -1,4 +1,4 @@
-/* $Id: semgr.c,v 1.48 2004/10/22 20:48:00 ekohl Exp $
+/* $Id: semgr.c,v 1.49 2004/10/24 15:26:14 weiden Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -104,7 +104,7 @@
   Status = NtCreateEvent(&EventHandle,
 			 EVENT_ALL_ACCESS,
 			 &ObjectAttributes,
-			 FALSE,
+			 SynchronizationEvent,
 			 FALSE);
   if (!NT_SUCCESS(Status))
     {

reactos/subsys/smss
init.c 1.55 -> 1.56
diff -u -r1.55 -r1.56
--- init.c	5 Jun 2004 09:35:52 -0000	1.55
+++ init.c	24 Oct 2004 15:26:14 -0000	1.56
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.55 2004/06/05 09:35:52 navaraf Exp $
+/* $Id: init.c,v 1.56 2004/10/24 15:26:14 weiden Exp $
  *
  * init.c - Session Manager initialization
  * 
@@ -943,7 +943,7 @@
   Status = NtCreateEvent(&CsrssInitEvent,
 			 EVENT_ALL_ACCESS,
 			 &ObjectAttributes,
-			 TRUE,
+			 NotificationEvent,
 			 FALSE);
   if (!NT_SUCCESS(Status))
     {

reactos/w32api/include/ddk
ntifs.h 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- ntifs.h	15 Sep 2004 18:57:01 -0000	1.6
+++ ntifs.h	24 Oct 2004 15:26:14 -0000	1.7
@@ -4393,7 +4393,7 @@
 NTAPI
 ZwPulseEvent (
     IN HANDLE   EventHandle,
-    OUT PULONG  PreviousState OPTIONAL
+    OUT PLONG   PreviousState OPTIONAL
 );
 
 NTSYSAPI
@@ -4543,7 +4543,7 @@
 NTAPI
 ZwResetEvent (
     IN HANDLE   EventHandle,
-    OUT PULONG  PreviousState OPTIONAL
+    OUT PLONG   PreviousState OPTIONAL
 );
 
 #if (VER_PRODUCTBUILD >= 2195)
@@ -4601,7 +4601,7 @@
 NTAPI
 ZwSetEvent (
     IN HANDLE   EventHandle,
-    OUT PULONG  PreviousState OPTIONAL
+    OUT PLONG   PreviousState OPTIONAL
 );
 
 NTSYSAPI

reactos/w32api/include/ddk
winddk.h 1.16 -> 1.17
diff -u -r1.16 -r1.17
--- winddk.h	23 Oct 2004 08:10:57 -0000	1.16
+++ winddk.h	24 Oct 2004 15:26:14 -0000	1.17
@@ -8651,8 +8651,8 @@
 NtCreateEvent(
   OUT PHANDLE  EventHandle,
   IN ACCESS_MASK  DesiredAccess,
-  IN POBJECT_ATTRIBUTES  ObjectAttributes,
-  IN BOOLEAN  ManualReset,
+  IN POBJECT_ATTRIBUTES  ObjectAttributes  OPTIONAL,
+  IN EVENT_TYPE  EventType,
   IN BOOLEAN  InitialState);
 
 NTOSAPI
@@ -8661,8 +8661,8 @@
 ZwCreateEvent(
   OUT PHANDLE  EventHandle,
   IN ACCESS_MASK  DesiredAccess,
-  IN POBJECT_ATTRIBUTES  ObjectAttributes,
-  IN BOOLEAN  ManualReset,
+  IN POBJECT_ATTRIBUTES  ObjectAttributes  OPTIONAL,
+  IN EVENT_TYPE  EventType,
   IN BOOLEAN  InitialState);
 
 NTOSAPI
@@ -8935,14 +8935,14 @@
 DDKAPI
 NtSetEvent(
   IN HANDLE  EventHandle,
-  IN PULONG  NumberOfThreadsReleased);
+  OUT PLONG  PreviousState  OPTIONAL);
 
 NTOSAPI
 NTSTATUS
 DDKAPI
 ZwSetEvent(
   IN HANDLE  EventHandle,
-  IN PULONG  NumberOfThreadsReleased);
+  OUT PLONG  PreviousState  OPTIONAL);
 
 NTOSAPI
 NTSTATUS
CVSspam 0.2.8