From: Alex Ionescu Date: Sun, 19 Jun 2005 07:11:38 +0000 (+0000) Subject: Fix some ntoskrnl things, like using Rtl instead of RosRtl, and undefining ROUND... X-Git-Tag: backups/rox-u@36851~2^2~88 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=10c1c40139c4d65f665083978fef32e9b19ae13a Fix some ntoskrnl things, like using Rtl instead of RosRtl, and undefining ROUND macros svn path=/trunk/; revision=16077 --- diff --git a/reactos/ntoskrnl/cc/copy.c b/reactos/ntoskrnl/cc/copy.c index bedb0176ed6..224564fb4d0 100644 --- a/reactos/ntoskrnl/cc/copy.c +++ b/reactos/ntoskrnl/cc/copy.c @@ -16,8 +16,6 @@ /* GLOBALS *******************************************************************/ -#define ROUND_DOWN(N, S) ((N) - ((N) % (S))) - static PFN_TYPE CcZeroPage = 0; #define MAX_ZERO_LENGTH (256 * 1024) diff --git a/reactos/ntoskrnl/cc/pin.c b/reactos/ntoskrnl/cc/pin.c index f196e1b9f9b..6e051f98db7 100644 --- a/reactos/ntoskrnl/cc/pin.c +++ b/reactos/ntoskrnl/cc/pin.c @@ -16,8 +16,6 @@ /* GLOBALS *******************************************************************/ -#define ROUND_DOWN(N, S) ((N) - ((N) % (S))) - extern NPAGED_LOOKASIDE_LIST iBcbLookasideList; /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/cm/regfile.c b/reactos/ntoskrnl/cm/regfile.c index 5396a77390c..5d4cb245d7f 100644 --- a/reactos/ntoskrnl/cm/regfile.c +++ b/reactos/ntoskrnl/cm/regfile.c @@ -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; diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index 621963a756a..355cd806e62 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -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; diff --git a/reactos/ntoskrnl/cm/regobj.c b/reactos/ntoskrnl/cm/regobj.c index 51c4ceb3ae0..f6832471eae 100644 --- a/reactos/ntoskrnl/cm/regobj.c +++ b/reactos/ntoskrnl/cm/regobj.c @@ -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; diff --git a/reactos/ntoskrnl/ex/callback.c b/reactos/ntoskrnl/ex/callback.c index fa0e9cf1ec5..f2bc5561331 100644 --- a/reactos/ntoskrnl/ex/callback.c +++ b/reactos/ntoskrnl/ex/callback.c @@ -65,7 +65,7 @@ ExpInitializeCallbacks(VOID) } /* Initialize the Object */ - RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\Callback" ); + RtlInitUnicodeString(&DirName, L"\\Callback" ); InitializeObjectAttributes( &ObjectAttributes, &DirName, diff --git a/reactos/ntoskrnl/include/internal/ke.h b/reactos/ntoskrnl/include/internal/ke.h index e76b03f6e5f..04847370ce1 100644 --- a/reactos/ntoskrnl/include/internal/ke.h +++ b/reactos/ntoskrnl/include/internal/ke.h @@ -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) \ diff --git a/reactos/ntoskrnl/include/internal/ntoskrnl.h b/reactos/ntoskrnl/include/internal/ntoskrnl.h index 30fe52c3006..74fb7d2a228 100644 --- a/reactos/ntoskrnl/include/internal/ntoskrnl.h +++ b/reactos/ntoskrnl/include/internal/ntoskrnl.h @@ -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__ */ /* diff --git a/reactos/ntoskrnl/include/ntoskrnl.h b/reactos/ntoskrnl/include/ntoskrnl.h index 5788bf0f15c..71aacbcbf27 100755 --- a/reactos/ntoskrnl/include/ntoskrnl.h +++ b/reactos/ntoskrnl/include/ntoskrnl.h @@ -74,4 +74,7 @@ #include #include + +#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24)) + #endif /* INCLUDE_NTOSKRNL_H */ diff --git a/reactos/ntoskrnl/ke/spinlock.c b/reactos/ntoskrnl/ke/spinlock.c index 6d14603aedf..969d4fa3711 100644 --- a/reactos/ntoskrnl/ke/spinlock.c +++ b/reactos/ntoskrnl/ke/spinlock.c @@ -62,6 +62,7 @@ KeAcquireInterruptSpinLock( { KIRQL oldIrql; + //KeRaiseIrql(Interrupt->SynchronizeIrql, &oldIrql); KeRaiseIrql(Interrupt->SynchLevel, &oldIrql); KiAcquireSpinLock(Interrupt->ActualLock); return oldIrql;