Author: ion
Date: Tue Oct 24 00:49:52 2006
New Revision: 24635
URL:
http://svn.reactos.org/svn/reactos?rev=24635&view=rev
Log:
- Implement NtSetEventBoostPriority, NtGetCurrentProcessorNumber,
NtQueryPortInformationProcess, NtWaitForMultipleObjects32.
Modified:
trunk/reactos/ntoskrnl/ex/event.c
trunk/reactos/ntoskrnl/ex/sysinfo.c
trunk/reactos/ntoskrnl/lpc/port.c
trunk/reactos/ntoskrnl/ob/obwait.c
Modified: trunk/reactos/ntoskrnl/ex/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/event.c?rev=24…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/event.c (original)
+++ trunk/reactos/ntoskrnl/ex/event.c Tue Oct 24 00:49:52 2006
@@ -463,7 +463,7 @@
EventHandle, PreviousState);
/* Check if we were called from user-mode */
- if((PreviousState) && (PreviousMode != KernelMode))
+ if ((PreviousState) && (PreviousMode != KernelMode))
{
/* Entry SEH Block */
_SEH_TRY
@@ -488,16 +488,14 @@
PreviousMode,
(PVOID*)&Event,
NULL);
-
- /* Check for success */
- if(NT_SUCCESS(Status))
+ if (NT_SUCCESS(Status))
{
/* Set the Event */
LONG Prev = KeSetEvent(Event, EVENT_INCREMENT, FALSE);
ObDereferenceObject(Event);
/* Check if caller wants the old state back */
- if(PreviousState)
+ if (PreviousState)
{
/* Entry SEH Block for return */
_SEH_TRY
@@ -511,10 +509,39 @@
}
_SEH_END;
}
- }
-
- /* Return Status */
- return Status;
+ }
+
+ /* Return Status */
+ return Status;
+}
+
+/*
+ * @implemented
+ */
+NTSTATUS
+NTAPI
+NtSetEventBoostPriority(IN HANDLE EventHandle)
+{
+ PKEVENT Event;
+ NTSTATUS Status;
+ PAGED_CODE();
+
+ /* Open the Object */
+ Status = ObReferenceObjectByHandle(EventHandle,
+ EVENT_MODIFY_STATE,
+ ExEventObjectType,
+ ExGetPreviousMode(),
+ (PVOID*)&Event,
+ NULL);
+ if (NT_SUCCESS(Status))
+ {
+ /* Set the Event */
+ KeSetEventBoostPriority(Event, NULL);
+ ObDereferenceObject(Event);
+ }
+
+ /* Return Status */
+ return Status;
}
/* EOF */
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c Tue Oct 24 00:49:52 2006
@@ -1692,5 +1692,12 @@
return STATUS_SUCCESS;
}
+ULONG
+NTAPI
+NtGetCurrentProcessorNumber(VOID)
+{
+ /* Just return the CPU */
+ return KeGetCurrentProcessorNumber();
+}
/* EOF */
Modified: trunk/reactos/ntoskrnl/lpc/port.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/port.c?rev=24…
==============================================================================
--- trunk/reactos/ntoskrnl/lpc/port.c (original)
+++ trunk/reactos/ntoskrnl/lpc/port.c Tue Oct 24 00:49:52 2006
@@ -133,4 +133,12 @@
return(STATUS_NOT_IMPLEMENTED);
}
+NTSTATUS
+NTAPI
+NtQueryPortInformationProcess(VOID)
+{
+ /* This is all this function does */
+ return STATUS_UNSUCCESSFUL;
+}
+
/* EOF */
Modified: trunk/reactos/ntoskrnl/ob/obwait.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obwait.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obwait.c (original)
+++ trunk/reactos/ntoskrnl/ob/obwait.c Tue Oct 24 00:49:52 2006
@@ -278,6 +278,48 @@
}
/*++
+* @name NtWaitForMultipleObjects32
+* @implemented NT5.1
+*
+* The NtWaitForMultipleObjects32 routine <FILLMEIN>
+*
+* @param ObjectCount
+* <FILLMEIN>
+*
+* @param HandleArray
+* <FILLMEIN>
+*
+* @param WaitType
+* <FILLMEIN>
+*
+* @param Alertable
+* <FILLMEIN>
+*
+* @param TimeOut
+* <FILLMEIN>
+*
+* @return STATUS_SUCCESS or appropriate error value.
+*
+* @remarks None.
+*
+*--*/
+NTSTATUS
+NTAPI
+NtWaitForMultipleObjects32(IN ULONG ObjectCount,
+ IN PLONG Handles,
+ IN WAIT_TYPE WaitType,
+ IN BOOLEAN Alertable,
+ IN PLARGE_INTEGER TimeOut OPTIONAL)
+{
+ /* FIXME WOW64 */
+ return NtWaitForMultipleObjects(ObjectCount,
+ (PHANDLE)Handles,
+ WaitType,
+ Alertable,
+ TimeOut);
+}
+
+/*++
* @name NtWaitForSingleObject
* @implemented NT4
*