Fix some ntoskrnl things, like using Rtl instead of RosRtl, and undefining ROUND...
authorAlex Ionescu <aionescu@gmail.com>
Sun, 19 Jun 2005 07:11:38 +0000 (07:11 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sun, 19 Jun 2005 07:11:38 +0000 (07:11 +0000)
svn path=/trunk/; revision=16077

reactos/ntoskrnl/cc/copy.c
reactos/ntoskrnl/cc/pin.c
reactos/ntoskrnl/cm/regfile.c
reactos/ntoskrnl/cm/registry.c
reactos/ntoskrnl/cm/regobj.c
reactos/ntoskrnl/ex/callback.c
reactos/ntoskrnl/include/internal/ke.h
reactos/ntoskrnl/include/internal/ntoskrnl.h
reactos/ntoskrnl/include/ntoskrnl.h
reactos/ntoskrnl/ke/spinlock.c

index bedb017..224564f 100644 (file)
@@ -16,8 +16,6 @@
 
 /* GLOBALS *******************************************************************/
 
-#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
-
 static PFN_TYPE CcZeroPage = 0;
 
 #define MAX_ZERO_LENGTH        (256 * 1024)
index f196e1b..6e051f9 100644 (file)
@@ -16,8 +16,6 @@
 
 /* GLOBALS *******************************************************************/
 
-#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
-
 extern NPAGED_LOOKASIDE_LIST iBcbLookasideList;
 
 /* FUNCTIONS *****************************************************************/
index 5396a77..5d4cb24 100644 (file)
@@ -20,8 +20,6 @@
 
 /* LOCAL MACROS *************************************************************/
 
-#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
-
 #define ABS_VALUE(V) (((V) < 0) ? -(V) : (V))
 
 BOOLEAN CmiDoVerify = FALSE;
index 621963a..355cd80 100644 (file)
@@ -650,7 +650,7 @@ CmiCreateCurrentControlSetLink(VOID)
 
   DPRINT("Link target '%S'\n", TargetNameBuffer);
 
-  RtlRosInitUnicodeStringFromLiteral(&LinkName,
+  RtlInitUnicodeString(&LinkName,
                                  L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet");
   InitializeObjectAttributes(&ObjectAttributes,
                             &LinkName,
@@ -670,7 +670,7 @@ CmiCreateCurrentControlSetLink(VOID)
       return(Status);
     }
 
-  RtlRosInitUnicodeStringFromLiteral(&LinkValue,
+  RtlInitUnicodeString(&LinkValue,
                                  L"SymbolicLinkValue");
   Status = ZwSetValueKey(KeyHandle,
                         &LinkValue,
@@ -925,7 +925,7 @@ CmiInitControlSetLink (VOID)
   NTSTATUS Status;
 
   /* Create 'ControlSet001' key */
-  RtlRosInitUnicodeStringFromLiteral (&ControlSetKeyName,
+  RtlInitUnicodeString(&ControlSetKeyName,
                                   L"\\Registry\\Machine\\SYSTEM\\ControlSet001");
   InitializeObjectAttributes (&ObjectAttributes,
                              &ControlSetKeyName,
@@ -947,7 +947,7 @@ CmiInitControlSetLink (VOID)
   ZwClose (KeyHandle);
 
   /* Link 'CurrentControlSet' to 'ControlSet001' key */
-  RtlRosInitUnicodeStringFromLiteral (&ControlSetLinkName,
+  RtlInitUnicodeString (&ControlSetLinkName,
                                   L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet");
   InitializeObjectAttributes (&ObjectAttributes,
                              &ControlSetLinkName,
@@ -967,7 +967,7 @@ CmiInitControlSetLink (VOID)
       return Status;
     }
 
-  RtlRosInitUnicodeStringFromLiteral (&ControlSetValueName,
+  RtlInitUnicodeString (&ControlSetValueName,
                                   L"SymbolicLinkValue");
   Status = ZwSetValueKey (KeyHandle,
                          &ControlSetValueName,
@@ -1008,7 +1008,7 @@ CmiInitHives(BOOLEAN SetupBoot)
 
   if (SetupBoot == TRUE)
     {
-      RtlRosInitUnicodeStringFromLiteral(&KeyName,
+      RtlInitUnicodeString(&KeyName,
                                      L"\\Registry\\Machine\\HARDWARE");
       InitializeObjectAttributes(&ObjectAttributes,
                                 &KeyName,
@@ -1024,7 +1024,7 @@ CmiInitHives(BOOLEAN SetupBoot)
          return(Status);
        }
 
-      RtlRosInitUnicodeStringFromLiteral(&ValueName,
+      RtlInitUnicodeString(&ValueName,
                                      L"InstallPath");
 
       BufferSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + 4096;
index 51c4ceb..f683247 100644 (file)
@@ -674,7 +674,7 @@ CmiGetLinkTarget(PREGISTRY_HIVE RegistryHive,
                 PKEY_CELL KeyCell,
                 PUNICODE_STRING TargetPath)
 {
-  UNICODE_STRING LinkName = ROS_STRING_INITIALIZER(L"SymbolicLinkValue");
+  UNICODE_STRING LinkName = RTL_CONSTANT_STRING(L"SymbolicLinkValue");
   PVALUE_CELL ValueCell;
   PDATA_CELL DataCell;
   NTSTATUS Status;
index fa0e9cf..f2bc556 100644 (file)
@@ -65,7 +65,7 @@ ExpInitializeCallbacks(VOID)
    }
 
    /* Initialize the Object */
-   RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\Callback" );
+   RtlInitUnicodeString(&DirName, L"\\Callback" );
    InitializeObjectAttributes(
       &ObjectAttributes,
       &DirName,
index e76b03f..0484737 100644 (file)
@@ -222,19 +222,6 @@ struct _KEXCEPTION_FRAME;
 #define IPI_REQUEST_DPC                    2
 #define IPI_REQUEST_FREEZE         3
 
-#ifndef __USE_W32API
-typedef enum _KTHREAD_STATE {
-    Initialized,
-    Ready,
-    Running,
-    Standby,
-    Terminated,
-    Waiting,
-    Transition,
-    DeferredReady,
-} THREAD_STATE, *PTHREAD_STATE;
-#endif
-
 /* MACROS *************************************************************************/
 
 #define KeEnterCriticalRegion(X) \
index 30fe52c..74fb7d2 100644 (file)
@@ -55,6 +55,13 @@ BOOLEAN CmImportSystemHive(PCHAR ChunkBase, ULONG ChunkSize);
 BOOLEAN CmImportHardwareHive(PCHAR ChunkBase, ULONG ChunkSize);
 VOID KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock);
 
+BOOLEAN
+FASTCALL
+RtlpCreateUnicodeString(
+   IN OUT PUNICODE_STRING UniDest,
+   IN PCWSTR  Source,
+   IN POOL_TYPE PoolType);
+   
 #endif /* __ASM__ */
 
 /*
index 5788bf0..71aacbc 100755 (executable)
@@ -74,4 +74,7 @@
 #include <napi/teb.h>
 #include <napi/win32.h>
 
+
+#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
+
 #endif /* INCLUDE_NTOSKRNL_H */
index 6d14603..969d4fa 100644 (file)
@@ -62,6 +62,7 @@ KeAcquireInterruptSpinLock(
 {
    KIRQL oldIrql;
 
+   //KeRaiseIrql(Interrupt->SynchronizeIrql, &oldIrql);
    KeRaiseIrql(Interrupt->SynchLevel, &oldIrql);
    KiAcquireSpinLock(Interrupt->ActualLock);
    return oldIrql;