Author: tkreuzer Date: Wed Jan 13 23:35:43 2010 New Revision: 45066
URL: http://svn.reactos.org/svn/reactos?rev=45066&view=rev Log: Merge from amd64-branch: 34969 Some ULONG / SIZE_T fixes, handle amd64 in PspCreateThread 34986 Fix several 64 bit issues 35968 Fix Size parameter of CmpAllpcate (ULONG->SIZE_T). 35970 Fix pointer <-> ULONG cast 35971 Fix pointer <-> ULONG cast fixes 36332 fix 64 bit warnings 37435 Fix several ULONG/ULONG_PTR issues. Add a parameter to DefaultQueryInfoBufferCheck for ULONG_PTR/SIZE_T ResultLength 39522 ExInitializeSystemlookasideList: Use InitializeSListHead instead of directly accessing the members. ExpAllocateLocallyUniqueId: use InterlockedCompareExchange64 instead of non-portable ExfInterlockedCompareExchange64 37433 fix InterlockedExchangePointer usage 38105 Use KeGetCurrentPrcb() instead of KeGetPcr()->Prcb / KeGetPcr()->CurrentPrcb 39160 Use wbinvd instruction for amd64, too.
Modified: trunk/reactos/ntoskrnl/cc/copy.c trunk/reactos/ntoskrnl/config/cmkcbncb.c trunk/reactos/ntoskrnl/config/cmsysini.c trunk/reactos/ntoskrnl/config/cmwraprs.c trunk/reactos/ntoskrnl/ex/event.c trunk/reactos/ntoskrnl/ex/handle.c trunk/reactos/ntoskrnl/ex/harderr.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ex/lookas.c trunk/reactos/ntoskrnl/ex/mutant.c trunk/reactos/ntoskrnl/ex/pushlock.c trunk/reactos/ntoskrnl/ex/resource.c trunk/reactos/ntoskrnl/ex/sem.c trunk/reactos/ntoskrnl/ex/sysinfo.c trunk/reactos/ntoskrnl/ex/timer.c trunk/reactos/ntoskrnl/ex/work.c trunk/reactos/ntoskrnl/include/internal/cm.h trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/include/internal/probe.h trunk/reactos/ntoskrnl/io/iomgr/iocomp.c trunk/reactos/ntoskrnl/io/iomgr/iofunc.c trunk/reactos/ntoskrnl/io/iomgr/irp.c trunk/reactos/ntoskrnl/kd/kdmain.c trunk/reactos/ntoskrnl/kd/wrappers/bochs.c trunk/reactos/ntoskrnl/kdbg/ (props changed) trunk/reactos/ntoskrnl/kdbg/kdb.c trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c trunk/reactos/ntoskrnl/ke/queue.c trunk/reactos/ntoskrnl/ke/thrdobj.c trunk/reactos/ntoskrnl/ke/thrdschd.c trunk/reactos/ntoskrnl/ke/wait.c trunk/reactos/ntoskrnl/mm/section.c trunk/reactos/ntoskrnl/ps/security.c trunk/reactos/ntoskrnl/se/audit.c trunk/reactos/ntoskrnl/se/lsa.c trunk/reactos/ntoskrnl/se/token.c
Modified: trunk/reactos/ntoskrnl/cc/copy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/copy.c?rev=4506... ============================================================================== --- trunk/reactos/ntoskrnl/cc/copy.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cc/copy.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -615,7 +615,7 @@ { CurrentLength = Length; } - MmInitializeMdl(Mdl, (PVOID)WriteOffset.u.LowPart, CurrentLength); + MmInitializeMdl(Mdl, (PVOID)(ULONG_PTR)WriteOffset.QuadPart, CurrentLength); Mdl->MdlFlags |= (MDL_PAGES_LOCKED | MDL_IO_PAGE_READ); for (i = 0; i < ((Mdl->Size - sizeof(MDL)) / sizeof(ULONG)); i++) {
Modified: trunk/reactos/ntoskrnl/config/cmkcbncb.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmkcbncb.c?... ============================================================================== --- trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -1054,7 +1054,7 @@ for (i = 0; i < 4; i++) { /* Add it into the list */ - if (!InterlockedCompareExchangePointer(&KeyBody->KeyControlBlock-> + if (!InterlockedCompareExchangePointer((PVOID*)&KeyBody->KeyControlBlock-> KeyBodyArray[i], KeyBody, NULL)) @@ -1110,7 +1110,7 @@ for (i = 0; i < 4; i++) { /* Add it into the list */ - if (InterlockedCompareExchangePointer(&KeyBody->KeyControlBlock-> + if (InterlockedCompareExchangePointer((VOID*)&KeyBody->KeyControlBlock-> KeyBodyArray[i], NULL, KeyBody) == KeyBody)
Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c?... ============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -1079,7 +1079,7 @@ PAGED_CODE();
/* Get the hive index, make sure it makes sense */ - i = (ULONG)StartContext; + i = PtrToUlong(StartContext); ASSERT(CmpMachineHiveList[i].Name != NULL);
/* We were started */ @@ -1274,7 +1274,7 @@ 0, NULL, CmpLoadHiveThread, - (PVOID)i); + UlongToPtr(i)); if (NT_SUCCESS(Status)) { /* We don't care about the handle -- the thread self-terminates */
Modified: trunk/reactos/ntoskrnl/config/cmwraprs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmwraprs.c?... ============================================================================== --- trunk/reactos/ntoskrnl/config/cmwraprs.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmwraprs.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -51,7 +51,7 @@
PVOID NTAPI -CmpAllocate(IN ULONG Size, +CmpAllocate(IN SIZE_T Size, IN BOOLEAN Paged, IN ULONG Tag) {
Modified: trunk/reactos/ntoskrnl/ex/event.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/event.c?rev=450... ============================================================================== --- trunk/reactos/ntoskrnl/ex/event.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/event.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -331,6 +331,7 @@ EventInformation, EventInformationLength, ReturnLength, + NULL, PreviousMode); if(!NT_SUCCESS(Status)) {
Modified: trunk/reactos/ntoskrnl/ex/handle.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/handle.c?rev=45... ============================================================================== --- trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -515,7 +515,7 @@
/* Write the new level and attempt to change the table code */ TableBase = ((ULONG_PTR)Mid) | 1; - Value = InterlockedExchangePointer(&HandleTable->TableCode, TableBase); + Value = InterlockedExchangePointer((PVOID*)&HandleTable->TableCode, (PVOID)TableBase); } else if (TableLevel == 1) { @@ -532,7 +532,7 @@ if (!Low) return FALSE;
/* Update the table */ - Value = InterlockedExchangePointer(&SecondLevel[i], Low); + Value = InterlockedExchangePointer((PVOID*)&SecondLevel[i], Low); ASSERT(Value == NULL); } else @@ -559,7 +559,7 @@
/* Write the new table and change the table code */ TableBase = ((ULONG_PTR)High) | 2; - Value = InterlockedExchangePointer(&HandleTable->TableCode, + Value = InterlockedExchangePointer((PVOID*)&HandleTable->TableCode, (PVOID)TableBase); } } @@ -580,7 +580,7 @@ if (!Mid) return FALSE;
/* Update the table pointer */ - Value = InterlockedExchangePointer(&ThirdLevel[i], Mid); + Value = InterlockedExchangePointer((PVOID*)&ThirdLevel[i], Mid); ASSERT(Value == NULL); } else @@ -595,7 +595,7 @@ if (!Low) return FALSE;
/* Update the table pointer */ - Value = InterlockedExchangePointer(&ThirdLevel[i][j], Low); + Value = InterlockedExchangePointer((PVOID*)&ThirdLevel[i][j], Low); ASSERT(Value == NULL); } } @@ -885,8 +885,8 @@ /* It's not locked, remove the lock bit to lock it */ NewValue = OldValue & ~EXHANDLE_TABLE_ENTRY_LOCK_BIT; if (InterlockedCompareExchangePointer(&HandleTableEntry->Object, - NewValue, - OldValue) == (PVOID)OldValue) + (PVOID)NewValue, + (PVOID)OldValue) == (PVOID)OldValue) { /* We locked it, get out */ return TRUE; @@ -1009,7 +1009,7 @@ }
/* Clear the handle */ - Object = InterlockedExchangePointer(&HandleTableEntry->Object, NULL); + Object = InterlockedExchangePointer((PVOID*)&HandleTableEntry->Object, NULL);
/* Sanity checks */ ASSERT(Object != NULL);
Modified: trunk/reactos/ntoskrnl/ex/harderr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/harderr.c?rev=4... ============================================================================== --- trunk/reactos/ntoskrnl/ex/harderr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/harderr.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -387,7 +387,7 @@ IN ULONG ValidResponseOptions, OUT PULONG Response) { - ULONG Size; + SIZE_T Size; UNICODE_STRING CapturedParams[MAXIMUM_HARDERROR_PARAMETERS]; ULONG i; PULONG_PTR UserData = NULL, ParameterBase;
Modified: trunk/reactos/ntoskrnl/ex/init.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=4506... ============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -68,7 +68,7 @@ ULONG ExpAnsiCodePageDataOffset, ExpOemCodePageDataOffset; ULONG ExpUnicodeCaseTableDataOffset; NLSTABLEINFO ExpNlsTableInfo; -ULONG ExpNlsTableSize; +SIZE_T ExpNlsTableSize; PVOID ExpNlsSectionPointer;
/* CMOS Timer Sanity */ @@ -196,7 +196,7 @@ NTSTATUS Status; HANDLE NlsSection; PVOID SectionBase = NULL; - ULONG ViewSize = 0; + SIZE_T ViewSize = 0; LARGE_INTEGER SectionOffset = {{0, 0}}; PLIST_ENTRY ListHead, NextEntry; PMEMORY_ALLOCATION_DESCRIPTOR MdBlock; @@ -369,7 +369,7 @@ OUT PCHAR *ProcessEnvironment) { NTSTATUS Status; - ULONG Size; + SIZE_T Size; PWSTR p; UNICODE_STRING NullString = RTL_CONSTANT_STRING(L""); UNICODE_STRING SmssName, Environment, SystemDriveString, DebugString; @@ -829,7 +829,7 @@ PLDR_DATA_TABLE_ENTRY NtosEntry; PRTL_MESSAGE_RESOURCE_ENTRY MsgEntry; ANSI_STRING CsdString; - ULONG Remaining = 0; + SIZE_T Remaining = 0; PCHAR RcEnd = NULL; CHAR VersionBuffer [65];
@@ -1245,7 +1245,8 @@ PCHAR StringBuffer, EndBuffer, BeginBuffer, MpString = ""; PINIT_BUFFER InitBuffer; ANSI_STRING TempString; - ULONG LastTzBias, Size, Length, YearHack = 0, Disposition, MessageCode = 0; + ULONG LastTzBias, Length, YearHack = 0, Disposition, MessageCode = 0; + SIZE_T Size; PRTL_USER_PROCESS_INFORMATION ProcessInfo; KEY_VALUE_PARTIAL_INFORMATION KeyPartialInfo; UNICODE_STRING KeyName, DebugString; @@ -1325,14 +1326,14 @@ StringBuffer = InitBuffer->VersionBuffer; BeginBuffer = StringBuffer; EndBuffer = StringBuffer; - Length = 256; + Size = 256; if (CmCSDVersionString.Length) { /* Print the version string */ Status = RtlStringCbPrintfExA(StringBuffer, 255, &EndBuffer, - &Length, + &Size, 0, ": %wZ", &CmCSDVersionString); @@ -1345,7 +1346,7 @@ else { /* No version */ - Length = 255; + Size = 255; }
/* Null-terminate the string */ @@ -1369,7 +1370,7 @@ { /* Create the banner message */ Status = RtlStringCbPrintfA(EndBuffer, - Length, + Size, MsgEntry->Text, StringBuffer, NtBuildNumber & 0xFFFF, @@ -1383,7 +1384,7 @@ else { /* Use hard-coded banner message */ - Status = RtlStringCbCopyA(EndBuffer, Length, "REACTOS (R)\n"); + Status = RtlStringCbCopyA(EndBuffer, Size, "REACTOS (R)\n"); if (!NT_SUCCESS(Status)) { /* Bugcheck */
Modified: trunk/reactos/ntoskrnl/ex/lookas.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/lookas.c?rev=45... ============================================================================== --- trunk/reactos/ntoskrnl/ex/lookas.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/lookas.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -47,9 +47,7 @@ List->Depth = 2; List->Allocate = ExAllocatePoolWithTag; List->Free = ExFreePool; - List->ListHead.Next.Next = NULL; - List->ListHead.Depth = 0; - List->ListHead.Sequence = 0; + InitializeSListHead(&List->ListHead); List->TotalAllocates = 0; List->AllocateHits = 0; List->TotalFrees = 0;
Modified: trunk/reactos/ntoskrnl/ex/mutant.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/mutant.c?rev=45... ============================================================================== --- trunk/reactos/ntoskrnl/ex/mutant.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/mutant.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -242,6 +242,7 @@ MutantInformation, MutantInformationLength, ResultLength, + NULL, PreviousMode); if(!NT_SUCCESS(Status)) {
Modified: trunk/reactos/ntoskrnl/ex/pushlock.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/pushlock.c?rev=... ============================================================================== --- trunk/reactos/ntoskrnl/ex/pushlock.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/pushlock.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -20,6 +20,12 @@ #undef PEX_PUSH_LOCK
/* PRIVATE FUNCTIONS *********************************************************/ + +#ifdef _WIN64 +#define InterlockedAndPointer(ptr,val) InterlockedAnd64((PLONGLONG)ptr,(LONGLONG)val) +#else +#define InterlockedAndPointer(ptr,val) InterlockedAnd((PLONG)ptr,(LONG)val) +#endif
/*++ * @name ExpInitializePushLocks @@ -91,7 +97,7 @@ ASSERT(NewValue.Waiting);
/* Write the New Value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value == OldValue.Value) return; @@ -101,7 +107,7 @@ }
/* Save the First Block */ - FirstWaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)OldValue.Ptr & + FirstWaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)(OldValue.Value & ~EX_PUSH_LOCK_PTR_BITS); WaitBlock = FirstWaitBlock;
@@ -139,7 +145,7 @@ ASSERT(!NewValue.Waking);
/* Write the New Value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value == OldValue.Value) break; @@ -158,7 +164,7 @@ ASSERT(PushLock->Waiting);
/* Remove waking bit from pushlock */ - InterlockedAnd((PLONG)PushLock, ~EX_PUSH_LOCK_WAKING); + InterlockedAndPointer(&PushLock->Value, ~EX_PUSH_LOCK_WAKING);
/* Leave the loop */ break; @@ -240,7 +246,7 @@ }
/* Get the wait block */ - WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)OldValue.Ptr & + WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)(OldValue.Value & ~EX_PUSH_LOCK_PTR_BITS);
/* Loop the blocks */ @@ -274,7 +280,7 @@ ASSERT(!NewValue.Waking);
/* Update the value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr);
@@ -478,7 +484,7 @@ ASSERT(NewValue.Locked);
/* Set the new value */ - if (InterlockedCompareExchangePointer(PushLock, + if (InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr) != OldValue.Ptr) { @@ -508,8 +514,8 @@ WaitBlock->ShareCount = 0;
/* Set the current Wait Block pointer */ - WaitBlock->Next = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR) - OldValue.Ptr &~ EX_PUSH_LOCK_PTR_BITS); + WaitBlock->Next = (PEX_PUSH_LOCK_WAIT_BLOCK)( + OldValue.Value &~ EX_PUSH_LOCK_PTR_BITS);
/* Point to ours */ NewValue.Value = (OldValue.Value & EX_PUSH_LOCK_MULTIPLE_SHARED) | @@ -564,7 +570,7 @@
/* Write the new value */ TempValue = NewValue; - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value != OldValue.Value) @@ -663,7 +669,7 @@ ASSERT(NewValue.Locked);
/* Set the new value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value != OldValue.Value) @@ -688,8 +694,8 @@ if (OldValue.Waiting) { /* Set the current Wait Block pointer */ - WaitBlock->Next = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR) - OldValue.Ptr &~ EX_PUSH_LOCK_PTR_BITS); + WaitBlock->Next = (PEX_PUSH_LOCK_WAIT_BLOCK)( + OldValue.Value &~ EX_PUSH_LOCK_PTR_BITS);
/* Nobody is the last waiter yet */ WaitBlock->Last = NULL; @@ -727,7 +733,7 @@ #endif
/* Write the new value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Ptr != OldValue.Ptr) @@ -826,7 +832,7 @@ }
/* Write the New Value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value == OldValue.Value) return; @@ -840,7 +846,7 @@ if (OldValue.MultipleShared) { /* Get the wait block */ - WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)OldValue.Ptr & + WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)(OldValue.Value & ~EX_PUSH_LOCK_PTR_BITS);
/* Loop until we find the last wait block */ @@ -893,7 +899,7 @@ ASSERT(NewValue.Waking && !NewValue.Locked && !NewValue.MultipleShared);
/* Write the new value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value == OldValue.Value) return; @@ -913,7 +919,7 @@
/* Write the new value */ WakeValue = NewValue; - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value != OldValue.Value) continue; @@ -966,7 +972,7 @@ }
/* Write the New Value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value == OldValue.Value) return; @@ -979,7 +985,7 @@ if (OldValue.MultipleShared) { /* Get the wait block */ - WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)OldValue.Ptr & + WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)(OldValue.Value & ~EX_PUSH_LOCK_PTR_BITS);
/* Loop until we find the last wait block */ @@ -1029,7 +1035,7 @@ ASSERT(NewValue.Waking && !NewValue.Locked && !NewValue.MultipleShared);
/* Write the new value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value == OldValue.Value) return; @@ -1049,7 +1055,7 @@
/* Write the new value */ WakeValue = NewValue; - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr); if (NewValue.Value != OldValue.Value) continue; @@ -1103,7 +1109,7 @@
/* Write the New Value. Save our original value for waking */ WakeValue = NewValue; - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr);
@@ -1124,7 +1130,7 @@ ASSERT(NewValue.Waking && !NewValue.Waiting);
/* Write the New Value */ - NewValue.Ptr = InterlockedCompareExchangePointer(PushLock, + NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr);
@@ -1168,7 +1174,7 @@ NewValue.Waking = TRUE;
/* Write the New Value */ - if (InterlockedCompareExchangePointer(PushLock, + if (InterlockedCompareExchangePointer(&PushLock->Ptr, NewValue.Ptr, OldValue.Ptr) == OldValue.Ptr) {
Modified: trunk/reactos/ntoskrnl/ex/resource.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/resource.c?rev=... ============================================================================== --- trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -214,7 +214,7 @@ KeInitializeEvent(Event, SynchronizationEvent, FALSE);
/* Set it */ - if (InterlockedCompareExchangePointer(&Resource->ExclusiveWaiters, + if (InterlockedCompareExchangePointer((PVOID*)&Resource->ExclusiveWaiters, Event, NULL)) { @@ -274,7 +274,7 @@ KeInitializeSemaphore(Semaphore, 0, MAXLONG);
/* Set it */ - if (InterlockedCompareExchangePointer(&Resource->SharedWaiters, + if (InterlockedCompareExchangePointer((PVOID*)&Resource->SharedWaiters, Semaphore, NULL)) {
Modified: trunk/reactos/ntoskrnl/ex/sem.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sem.c?rev=45066... ============================================================================== --- trunk/reactos/ntoskrnl/ex/sem.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sem.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -235,6 +235,7 @@ SemaphoreInformation, SemaphoreInformationLength, ReturnLength, + NULL, PreviousMode); if (!NT_SUCCESS(Status)) {
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=4... ============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -1113,7 +1113,7 @@
for (Count = 0; HandleCount > 0 ; HandleCount--) { - Shi->Handles[i].UniqueProcessId = (USHORT)(ULONG)pr->UniqueProcessId; + Shi->Handles[i].UniqueProcessId = (USHORT)(ULONG_PTR)pr->UniqueProcessId; Count++; i++; } @@ -2023,7 +2023,7 @@ { PAGED_CODE();
-#if defined(_M_IX86) +#if defined(_M_IX86) || defined(_M_AMD64) __wbinvd(); #elif defined(_M_PPC) __asm__ __volatile__("tlbsync");
Modified: trunk/reactos/ntoskrnl/ex/timer.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/timer.c?rev=450... ============================================================================== --- trunk/reactos/ntoskrnl/ex/timer.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/timer.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -528,6 +528,7 @@ TimerInformation, TimerInformationLength, ReturnLength, + NULL, PreviousMode); if (!NT_SUCCESS(Status)) return Status;
Modified: trunk/reactos/ntoskrnl/ex/work.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/work.c?rev=4506... ============================================================================== --- trunk/reactos/ntoskrnl/ex/work.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/work.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -147,7 +147,7 @@ TimeoutPointer);
/* Check if we timed out and quit this loop in that case */ - if ((NTSTATUS)QueueEntry == STATUS_TIMEOUT) break; + if ((NTSTATUS)(ULONG_PTR)QueueEntry == STATUS_TIMEOUT) break;
/* Increment Processed Work Items */ InterlockedIncrement((PLONG)&WorkQueue->WorkItemsProcessed); @@ -271,7 +271,7 @@ NULL, NULL, ExpWorkerThreadEntryPoint, - (PVOID)Context); + UlongToPtr(Context));
/* If the thread is dynamic */ if (Dynamic)
Modified: trunk/reactos/ntoskrnl/include/internal/cm.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/c... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/cm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/cm.h [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -1301,7 +1301,7 @@ PVOID NTAPI CmpAllocate( - IN ULONG Size, + IN SIZE_T Size, IN BOOLEAN Paged, IN ULONG Tag );
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/k... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -257,7 +257,7 @@ );
/* Finds a new thread to run */ -NTSTATUS +LONG_PTR FASTCALL KiSwapThread( IN PKTHREAD Thread, @@ -641,7 +641,7 @@ FASTCALL KiUnwaitThread( IN PKTHREAD Thread, - IN NTSTATUS WaitStatus, + IN LONG_PTR WaitStatus, IN KPRIORITY Increment );
Modified: trunk/reactos/ntoskrnl/include/internal/probe.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/p... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/probe.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/probe.h [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -63,6 +63,7 @@ PVOID Buffer, ULONG BufferLength, PULONG ReturnLength, + PULONG_PTR ReturnLengthPtr, KPROCESSOR_MODE PreviousMode) { NTSTATUS Status = STATUS_SUCCESS; @@ -99,6 +100,10 @@ { ProbeForWriteUlong(ReturnLength); } + if (ReturnLengthPtr != NULL) + { + ProbeForWrite(ReturnLengthPtr, sizeof(ULONG_PTR), sizeof(ULONG_PTR)); + } } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
Modified: trunk/reactos/ntoskrnl/io/iomgr/iocomp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iocomp.c?... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/iocomp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/iocomp.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -398,6 +398,7 @@ IoCompletionInformation, IoCompletionInformationLength, ResultLength, + NULL, PreviousMode); if (!NT_SUCCESS(Status)) return Status;
@@ -497,11 +498,11 @@ ListEntry = KeRemoveQueue(Queue, PreviousMode, Timeout);
/* If we got a timeout or user_apc back, return the status */ - if (((NTSTATUS)ListEntry == STATUS_TIMEOUT) || - ((NTSTATUS)ListEntry == STATUS_USER_APC)) + if (((NTSTATUS)(ULONG_PTR)ListEntry == STATUS_TIMEOUT) || + ((NTSTATUS)(ULONG_PTR)ListEntry == STATUS_USER_APC)) { /* Set this as the status */ - Status = (NTSTATUS)ListEntry; + Status = (NTSTATUS)(ULONG_PTR)ListEntry; } else {
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c?... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -2451,7 +2451,7 @@ /* Set the Data */ Context->Key = CompletionInfo->Key; Context->Port = Queue; - if (InterlockedCompareExchangePointer(&FileObject-> + if (InterlockedCompareExchangePointer((PVOID*)&FileObject-> CompletionContext, Context, NULL))
Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/irp.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -1214,7 +1214,7 @@ if (LastStackPtr->Control & SL_ERROR_RETURNED) { /* Get the error code */ - ErrorCode = (NTSTATUS)LastStackPtr->Parameters.Others.Argument4; + ErrorCode = PtrToUlong(LastStackPtr->Parameters.Others.Argument4); }
/* Get the Current Stack and skip it */ @@ -1236,7 +1236,7 @@ /* Update the error for the current stack */ ErrorCode = Irp->IoStatus.Status; StackPtr->Control |= SL_ERROR_RETURNED; - LastStackPtr->Parameters.Others.Argument4 = (PVOID)ErrorCode; + LastStackPtr->Parameters.Others.Argument4 = UlongToPtr(ErrorCode); LastStackPtr->Control |= SL_ERROR_RETURNED; } } @@ -1610,7 +1610,7 @@ IoGetRequestorProcessId(IN PIRP Irp) { /* Return the requestor process' id */ - return (ULONG)(IoGetRequestorProcess(Irp)->UniqueProcessId); + return PtrToUlong(IoGetRequestorProcess(Irp)->UniqueProcessId); }
/* @@ -1782,5 +1782,5 @@ IoSetTopLevelIrp(IN PIRP Irp) { /* Set the IRP */ - PsGetCurrentThread()->TopLevelIrp = (ULONG)Irp; -} + PsGetCurrentThread()->TopLevelIrp = (ULONG_PTR)Irp; +}
Modified: trunk/reactos/ntoskrnl/kd/kdmain.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=45... ============================================================================== --- trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -54,7 +54,7 @@ #if DBG case ' soR': /* ROS-INTERNAL */ { - switch ((ULONG)Buffer1) + switch ((ULONG_PTR)Buffer1) { case ManualBugCheck: KeBugCheck(MANUALLY_INITIATED_CRASH);
Modified: trunk/reactos/ntoskrnl/kd/wrappers/bochs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/wrappers/bochs.... ============================================================================== --- trunk/reactos/ntoskrnl/kd/wrappers/bochs.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/wrappers/bochs.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -45,7 +45,7 @@ if (BootPhase == 0) { Value = READ_PORT_UCHAR(BOCHS_LOGGER_PORT); - if (Value != (ULONG)BOCHS_LOGGER_PORT) + if (Value != (ULONG_PTR)BOCHS_LOGGER_PORT) { KdpDebugMode.Bochs = FALSE; return;
Propchange: trunk/reactos/ntoskrnl/kdbg/ ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Wed Jan 13 23:35:43 2010 @@ -1,0 +1,1 @@ +/branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg:34711-34712,34743,34780-34782,34812,34839,34842,34908-34909,34917,34965,34969,34986,35323-35324,35347-35348,35361,35436,35444,35509,35515,35588,35683,35739,35746,35762,35771,35777,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,35968,35970-35971,36013,36172,36332,36360,36388-36389,36445,36502-36503,36505,36570,36614,36899,36930,36936,36992,37323,37433-37435,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38099,38148-38151,38264-38265,38268,38355,39151,39160,39333,39345,39522,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43838-43840,43857-43858,43860,43905-43907,43969,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338,44389,44391,44426,44460,44530,44540,44601
Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb.c?rev=450... ============================================================================== --- trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -209,6 +209,7 @@
RtlZeroMemory(KdbTrapFrame, sizeof(KDB_KTRAP_FRAME)); StackPtr = (ULONG_PTR *) KernelStack; +#if _M_X86_ KdbTrapFrame->Tf.Ebp = StackPtr[3]; KdbTrapFrame->Tf.Edi = StackPtr[4]; KdbTrapFrame->Tf.Esi = StackPtr[5]; @@ -220,6 +221,7 @@ KdbTrapFrame->Tf.SegDs = KGDT_R0_DATA; KdbTrapFrame->Tf.SegEs = KGDT_R0_DATA; KdbTrapFrame->Tf.SegGs = KGDT_R0_DATA; +#endif
/* FIXME: what about the other registers??? */ } @@ -421,7 +423,7 @@ }
/* Get the interrupt descriptor */ - if (!NT_SUCCESS(KdbpSafeReadMemory(IntDesc, (PVOID)(Idtr.Base + (IntVect * 8)), sizeof (IntDesc)))) + if (!NT_SUCCESS(KdbpSafeReadMemory(IntDesc, (PVOID)(ULONG_PTR)(Idtr.Base + (IntVect * 8)), sizeof (IntDesc)))) { /*KdbpPrint("Couldn't access memory at 0x%p\n", (ULONG_PTR)Idtr.Base + (IntVect * 8));*/ return FALSE; @@ -1126,7 +1128,7 @@ /* Get a pointer to the thread */ if (!NT_SUCCESS(PsLookupThreadByThreadId(ThreadId, &Thread))) { - KdbpPrint("Invalid thread id: 0x%08x\n", (ULONG)ThreadId); + KdbpPrint("Invalid thread id: 0x%08x\n", (ULONG_PTR)ThreadId); return FALSE; } Process = Thread->ThreadsProcess; @@ -1208,7 +1210,7 @@ /* Get a pointer to the process */ if (!NT_SUCCESS(PsLookupProcessByProcessId(ProcessId, &Process))) { - KdbpPrint("Invalid process id: 0x%08x\n", (ULONG)ProcessId); + KdbpPrint("Invalid process id: 0x%08x\n", (ULONG_PTR)ProcessId); return FALSE; }
@@ -1216,7 +1218,7 @@ ObDereferenceObject(Process); if (Entry == &KdbCurrentProcess->ThreadListHead) { - KdbpPrint("No threads in process 0x%08x, cannot attach to process!\n", (ULONG)ProcessId); + KdbpPrint("No threads in process 0x%p, cannot attach to process!\n", ProcessId); return FALSE; }
@@ -1257,7 +1259,7 @@ SavedStackLimit = Thread->Tcb.StackLimit; SavedKernelStack = Thread->Tcb.KernelStack; Thread->Tcb.InitialStack = Thread->Tcb.StackBase = (char*)KdbStack + KDB_STACK_SIZE; - Thread->Tcb.StackLimit = (ULONG)KdbStack; + Thread->Tcb.StackLimit = (ULONG_PTR)KdbStack; Thread->Tcb.KernelStack = (char*)KdbStack + KDB_STACK_SIZE;
/*KdbpPrint("Switching to KDB stack 0x%08x-0x%08x (Current Stack is 0x%08x)\n", Thread->Tcb.StackLimit, Thread->Tcb.StackBase, Esp);*/
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c... ============================================================================== --- trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -418,10 +418,10 @@ KdbpSymAddCachedFile(&LdrEntry->FullDllName, LdrEntry->PatchInformation); }
- DPRINT("Installed symbols: %wZ@%08x-%08x %p\n", + DPRINT("Installed symbols: %wZ@%p-%p %p\n", &LdrEntry->BaseDllName, LdrEntry->DllBase, - LdrEntry->SizeOfImage + (ULONG)LdrEntry->DllBase, + (PVOID)(LdrEntry->SizeOfImage + (ULONG_PTR)LdrEntry->DllBase), LdrEntry->PatchInformation);
}
Modified: trunk/reactos/ntoskrnl/ke/queue.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/queue.c?rev=450... ============================================================================== --- trunk/reactos/ntoskrnl/ke/queue.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/queue.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -57,7 +57,7 @@ KWAIT_BLOCK, WaitListEntry); Thread = WaitBlock->Thread; - KiUnwaitThread(Thread, (NTSTATUS)QueueEntry, IO_NO_INCREMENT); + KiUnwaitThread(Thread, (LONG_PTR)QueueEntry, IO_NO_INCREMENT); } } } @@ -102,7 +102,7 @@ Thread = WaitBlock->Thread;
/* Remove the queue from the thread's wait list */ - Thread->WaitStatus = (NTSTATUS)Entry; + Thread->WaitStatus = (LONG_PTR)Entry; if (Thread->WaitListEntry.Flink) RemoveEntryList(&Thread->WaitListEntry);
/* Increase the active threads and remove any wait reason */ @@ -239,7 +239,7 @@ IN PLARGE_INTEGER Timeout OPTIONAL) { PLIST_ENTRY QueueEntry; - NTSTATUS Status; + LONG_PTR Status; PKTHREAD Thread = KeGetCurrentThread(); PKQUEUE PreviousQueue; PKWAIT_BLOCK WaitBlock = &Thread->WaitBlock[0];
Modified: trunk/reactos/ntoskrnl/ke/thrdobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdobj.c?rev=4... ============================================================================== --- trunk/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -1356,7 +1356,9 @@ SavedEntry = Entry;
/* Now try to do the exchange */ - Entry = InterlockedCompareExchangePointer(ListHead, ThreadAddr, Entry); + Entry = InterlockedCompareExchangePointer((PVOID*)ListHead, + ThreadAddr, + Entry);
/* Break out if the change was succesful */ } while (Entry != SavedEntry);
Modified: trunk/reactos/ntoskrnl/ke/thrdschd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdschd.c?rev=... ============================================================================== --- trunk/reactos/ntoskrnl/ke/thrdschd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/thrdschd.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -334,7 +334,7 @@ return Thread; }
-NTSTATUS +LONG_PTR FASTCALL KiSwapThread(IN PKTHREAD CurrentThread, IN PKPRCB Prcb)
Modified: trunk/reactos/ntoskrnl/ke/wait.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/wait.c?rev=4506... ============================================================================== --- trunk/reactos/ntoskrnl/ke/wait.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/wait.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -87,7 +87,7 @@ VOID FASTCALL KiUnwaitThread(IN PKTHREAD Thread, - IN NTSTATUS WaitStatus, + IN LONG_PTR WaitStatus, IN KPRIORITY Increment) { /* Unlink the thread */
Modified: trunk/reactos/ntoskrnl/mm/section.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=4... ============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -4311,6 +4311,7 @@ sizeof(ExSectionInfoClass) / sizeof(ExSectionInfoClass[0]), SectionInformation, SectionInformationLength, + NULL, ResultLength, PreviousMode);
Modified: trunk/reactos/ntoskrnl/ps/security.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev=... ============================================================================== --- trunk/reactos/ntoskrnl/ps/security.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/security.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -631,7 +631,7 @@ if (!Impersonation) return STATUS_INSUFFICIENT_RESOURCES;
/* Update the pointer */ - OldData = InterlockedCompareExchangePointer(&Thread-> + OldData = InterlockedCompareExchangePointer((PVOID*)&Thread-> ImpersonationInfo, Impersonation, NULL);
Modified: trunk/reactos/ntoskrnl/se/audit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/audit.c?rev=450... ============================================================================== --- trunk/reactos/ntoskrnl/se/audit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/audit.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -138,7 +138,7 @@ if (NT_SUCCESS(Status)) { /* Set it */ - if (InterlockedCompareExchangePointer(&Process-> + if (InterlockedCompareExchangePointer((PVOID*)&Process-> SeAuditProcessCreationInfo.ImageFileName, AuditName, NULL))
Modified: trunk/reactos/ntoskrnl/se/lsa.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/lsa.c?rev=45066... ============================================================================== --- trunk/reactos/ntoskrnl/se/lsa.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/lsa.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -49,7 +49,7 @@ NTAPI LsaFreeReturnBuffer(PVOID Buffer) { - ULONG Size = 0; + SIZE_T Size = 0; return ZwFreeVirtualMemory(NtCurrentProcess(), &Buffer, &Size,
Modified: trunk/reactos/ntoskrnl/se/token.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=450... ============================================================================== --- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Wed Jan 13 23:35:43 2010 @@ -870,6 +870,7 @@ TokenInformation, TokenInformationLength, ReturnLength, + NULL, PreviousMode);
if(!NT_SUCCESS(Status))