Some more NDK fixes
authorAlex Ionescu <aionescu@gmail.com>
Sun, 19 Jun 2005 07:41:35 +0000 (07:41 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sun, 19 Jun 2005 07:41:35 +0000 (07:41 +0000)
svn path=/trunk/; revision=16080

reactos/include/napi/core.h
reactos/include/ndk/extypes.h
reactos/include/ndk/halfuncs.h
reactos/include/ndk/haltypes.h
reactos/include/ndk/zwfuncs.h
reactos/include/ndk/zwtypes.h
reactos/include/ntos/haltypes.h
reactos/ntoskrnl/ex/power.c
reactos/ntoskrnl/include/internal/mm.h

index 4ecb004..b7d9df0 100644 (file)
@@ -7,10 +7,6 @@
 #define MM_CORE_DUMP_HEADER_MAGIC         (0xdeafbead)
 #define MM_CORE_DUMP_HEADER_VERSION       (0x1)
 
-#define MM_CORE_DUMP_TYPE_NONE            (0x0)
-#define MM_CORE_DUMP_TYPE_MINIMAL         (0x1)
-#define MM_CORE_DUMP_TYPE_FULL            (0x2)
-
 typedef struct _MM_CORE_DUMP_HEADER
 {
   ULONG Magic;
index 9adc835..97a10fe 100644 (file)
@@ -18,6 +18,7 @@ extern NTOSAPI POBJECT_TYPE ExMutantObjectType;
 extern NTOSAPI POBJECT_TYPE ExTimerType;
 
 /* CONSTANTS *****************************************************************/
+#define INVALID_HANDLE_VALUE (HANDLE)-1
 
 /* ENUMERATIONS **************************************************************/
 
@@ -70,6 +71,12 @@ typedef struct _HANDLE_TABLE_ENTRY_INFO
     ULONG AuditMask;
 } HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
 
+typedef struct _RUNDOWN_DESCRIPTOR 
+{
+    ULONG_PTR References;
+    KEVENT RundownEvent;
+} RUNDOWN_DESCRIPTOR, *PRUNDOWN_DESCRIPTOR;
+
 typedef struct _HANDLE_TABLE_ENTRY 
 {
     union 
index 435dfaf..a8e80f1 100644 (file)
@@ -114,7 +114,7 @@ HalReleaseDisplayOwnership(VOID);
 VOID
 STDCALL
 HalReturnToFirmware(
-    FIRMWARE_ENTRY Action
+    FIRMWARE_REENTRY Action
 );
 
 VOID
index b6976da..91f7a7c 100644 (file)
@@ -34,9 +34,13 @@ extern ULONG NTOSAPI KdComPortInUse;
 /* ENUMERATIONS **************************************************************/
 typedef enum _FIRMWARE_ENTRY
 {
-    /*FIXME */
-    HalFixMe
-} FIRMWARE_ENTRY;
+  HalHaltRoutine,
+  HalPowerDownRoutine,
+  HalRestartRoutine,
+  HalRebootRoutine,
+  HalInteractiveModeRoutine,
+  HalMaximumRoutine
+} FIRMWARE_REENTRY, *PFIRMWARE_REENTRY;
 
 /* TYPES *********************************************************************/
 
index 916635a..5d5f272 100644 (file)
@@ -1396,7 +1396,7 @@ ZwOpenSection(
 NTSTATUS
 STDCALL
 NtOpenSemaphore(
-    IN HANDLE SemaphoreHandle,
+    OUT PHANDLE SemaphoreHandle,
     IN ACCESS_MASK DesiredAcces,
     IN POBJECT_ATTRIBUTES ObjectAttributes
 );
@@ -1404,7 +1404,7 @@ NtOpenSemaphore(
 NTSTATUS
 STDCALL
 ZwOpenSemaphore(
-    IN HANDLE SemaphoreHandle,
+    OUT PHANDLE SemaphoreHandle,
     IN ACCESS_MASK DesiredAcces,
     IN POBJECT_ATTRIBUTES ObjectAttributes
 );
@@ -2945,13 +2945,13 @@ ZwSetVolumeInformationFile(
 NTSTATUS
 STDCALL
 NtShutdownSystem(
-    IN ULONG Action
+    IN SHUTDOWN_ACTION Action
 );
 
 NTSTATUS
 STDCALL
 ZwShutdownSystem(
-    IN ULONG Action
+    IN SHUTDOWN_ACTION Action
 );
 
 NTSTATUS
index 4fd01e8..566e14e 100644 (file)
 
 /* ENUMERATIONS **************************************************************/
 
+typedef enum SHUTDOWN_ACTION_TAG 
+{
+    ShutdownNoReboot,
+    ShutdownReboot,
+    ShutdownPowerOff
+} SHUTDOWN_ACTION;
+
 typedef enum _PLUGPLAY_BUS_CLASS
 {
     SystemBus,
@@ -198,7 +205,7 @@ typedef LANGID *PLANGID;
 typedef struct _MUTANT_BASIC_INFORMATION 
 {
     LONG CurrentCount;
-    BOOLEAN OwnedbyCalled;
+    BOOLEAN OwnedByCaller;
     BOOLEAN AbandonedState;
 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
 
index 54b4bc3..10c8e55 100755 (executable)
 
 
 /* HalReturnToFirmware */
-#define FIRMWARE_HALT   1
-#define FIRMWARE_REBOOT 3
+typedef enum _FIRMWARE_ENTRY
+{
+  HalHaltRoutine,
+  HalPowerDownRoutine,
+  HalRestartRoutine,
+  HalRebootRoutine,
+  HalInteractiveModeRoutine,
+  HalMaximumRoutine
+} FIRMWARE_REENTRY, *PFIRMWARE_REENTRY;
 
 #ifndef __USE_W32API
 
index 8e655fa..07a3101 100644 (file)
@@ -96,11 +96,11 @@ ShutdownThreadMain(PVOID Context)
      }
    else if (Action == ShutdownReboot)
      {
-        HalReturnToFirmware (FIRMWARE_REBOOT);
+        HalReturnToFirmware (HalRebootRoutine);
      }
    else
      {
-        HalReturnToFirmware (FIRMWARE_HALT);
+        HalReturnToFirmware (HalHaltRoutine);
      }
 }
 
index 497ee4b..154c4ad 100644 (file)
@@ -323,6 +323,10 @@ extern MM_STATS MmStats;
 
 #define MM_PHYSICAL_PAGE_MPW_PENDING     (0x8)
 
+#define MM_CORE_DUMP_TYPE_NONE            (0x0)
+#define MM_CORE_DUMP_TYPE_MINIMAL         (0x1)
+#define MM_CORE_DUMP_TYPE_FULL            (0x2)
+
 #define MM_PAGEOP_PAGEIN        (1)
 #define MM_PAGEOP_PAGEOUT       (2)
 #define MM_PAGEOP_PAGESYNCH     (3)