ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2010
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
435 discussions
Start a n
N
ew thread
[gschneider] 46816: [TASKMGR] - Implement a SID to user name cache, patch by Timo Kreuzer with some changes by me See issue #4844 for more details.
by gschneider@svn.reactos.org
Author: gschneider Date: Sat Apr 10 17:51:31 2010 New Revision: 46816 URL:
http://svn.reactos.org/svn/reactos?rev=46816&view=rev
Log: [TASKMGR] - Implement a SID to user name cache, patch by Timo Kreuzer with some changes by me See issue #4844 for more details. Modified: trunk/reactos/base/applications/taskmgr/perfdata.c Modified: trunk/reactos/base/applications/taskmgr/perfdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] Sat Apr 10 17:51:31 2010 @@ -40,6 +40,15 @@ PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SystemProcessorTimeInfo = NULL; PSID SystemUserSid = NULL; +typedef struct _SIDTOUSERNAME +{ + LIST_ENTRY List; + LPWSTR pszName; + BYTE Data[0]; +} SIDTOUSERNAME, *PSIDTOUSERNAME; + +static LIST_ENTRY SidToUserNameHead = {&SidToUserNameHead, &SidToUserNameHead}; + BOOL PerfDataInitialize(void) { SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY}; @@ -63,6 +72,8 @@ void PerfDataUninitialize(void) { + PLIST_ENTRY pCur; + PSIDTOUSERNAME pEntry; if (pPerfData != NULL) HeapFree(GetProcessHeap(), 0, pPerfData); @@ -73,6 +84,15 @@ { FreeSid(SystemUserSid); SystemUserSid = NULL; + } + + /* Free user names cache list */ + pCur = SidToUserNameHead.Flink; + while (pCur != &SidToUserNameHead) + { + pEntry = CONTAINING_RECORD(pCur, SIDTOUSERNAME, List); + pCur = pCur->Flink; + HeapFree(GetProcessHeap(), 0, pEntry); } } @@ -84,6 +104,56 @@ if (Sid != NULL) LookupAccountSidW(NULL, Sid, szBuffer, &BufferSize, szDomainNameUnused, &DomainNameLen, &Use); +} + +VOID +WINAPI +CachedGetUserFromSid( + PSID pSid, + LPWSTR pUserName, + PULONG pcwcUserName) +{ + PLIST_ENTRY pCur; + PSIDTOUSERNAME pEntry; + ULONG cbSid, cwcUserName; + + cwcUserName = *pcwcUserName; + + /* Walk through the list */ + for(pCur = SidToUserNameHead.Flink; + pCur != &SidToUserNameHead; + pCur = pCur->Flink) + { + pEntry = CONTAINING_RECORD(pCur, SIDTOUSERNAME, List); + if (EqualSid((PSID)&pEntry->Data, pSid)) + { + wcsncpy(pUserName, pEntry->pszName, cwcUserName); + *pcwcUserName = cwcUserName; + return; + } + } + + /* We didn't find the SID in the list, get the name conventional */ + SidToUserName(pSid, pUserName, cwcUserName); + + /* Allocate a new entry */ + *pcwcUserName = wcslen(pUserName); + cwcUserName = *pcwcUserName + 1; + cbSid = GetLengthSid(pSid); + pEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(SIDTOUSERNAME) + cbSid + cwcUserName * sizeof(WCHAR)); + + /* Copy the Sid and name to our entry */ + CopySid(cbSid, (PSID)&pEntry->Data, pSid); + pEntry->pszName = (LPWSTR)(pEntry->Data + cbSid); + wcsncpy(pEntry->pszName, pUserName, cwcUserName); + + /* Insert the new entry */ + pEntry->List.Flink = &SidToUserNameHead; + pEntry->List.Blink = SidToUserNameHead.Blink; + SidToUserNameHead.Blink->Flink = &pEntry->List; + SidToUserNameHead.Blink = &pEntry->List; + + return; } void PerfDataRefresh(void) @@ -106,6 +176,7 @@ PSECURITY_DESCRIPTOR ProcessSD; PSID ProcessUser; ULONG Buffer[64]; /* must be 4 bytes aligned! */ + ULONG cwcUserName; /* Get new system time */ status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo, sizeof(SysTimeInfo), 0); @@ -341,7 +412,8 @@ ZeroMemory(&pPerfData[Idx].IOCounters, sizeof(IO_COUNTERS)); } - SidToUserName(ProcessUser, pPerfData[Idx].UserName, sizeof(pPerfData[0].UserName) / sizeof(pPerfData[0].UserName[0])); + cwcUserName = sizeof(pPerfData[0].UserName) / sizeof(pPerfData[0].UserName[0]); + CachedGetUserFromSid(ProcessUser, pPerfData[Idx].UserName, &cwcUserName); if (ProcessSD != NULL) {
14 years, 8 months
1
0
0
0
[tkreuzer] 46815: [HAL] Make it compile again
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Apr 10 17:00:03 2010 New Revision: 46815 URL:
http://svn.reactos.org/svn/reactos?rev=46815&view=rev
Log: [HAL] Make it compile again Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/halinit.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/halinit.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/usage.c branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/halinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/halinit.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/halinit.c [iso-8859-1] Sat Apr 10 17:00:03 2010 @@ -22,6 +22,8 @@ #endif /* PRIVATE FUNCTIONS *********************************************************/ + +#if 0 VOID NTAPI @@ -144,5 +146,21 @@ /* FIXME: Report HAL Usage to kernel */ } +#endif + +VOID +HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock) + +{ + + DPRINT("HalpInitPhase0()\n"); + + +} + +VOID +HalpInitPhase1(VOID) +{ +} /* EOF */ Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c [iso-8859-1] Sat Apr 10 17:00:03 2010 @@ -15,36 +15,9 @@ #include <debug.h> LARGE_INTEGER HalpPerformanceFrequency; +KAFFINITY HalpActiveProcessors; /* PRIVATE FUNCTIONS *********************************************************/ - -VOID -NTAPI -HalpCheckPowerButton(VOID) -{ - /* Nothing to do on non-ACPI */ - return; -} - -PVOID -NTAPI -HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress, - IN ULONG NumberPage) -{ - /* Use kernel memory manager I/O map facilities */ - return MmMapIoSpace(PhysicalAddress, - NumberPage << PAGE_SHIFT, - MmNonCached); -} - -VOID -NTAPI -HalpUnmapVirtualAddress(IN PVOID VirtualAddress, - IN ULONG NumberPages) -{ - /* Use kernel memory manager I/O map facilities */ - MmUnmapIoSpace(VirtualAddress, NumberPages << PAGE_SHIFT); -} VOID NTAPI @@ -82,71 +55,12 @@ /* FUNCTIONS *****************************************************************/ -/* - * @implemented - */ VOID NTAPI -HalHandleNMI(IN PVOID NmiInfo) +HalBugCheckSystem( + IN PWHEA_ERROR_RECORD ErrorRecord) { - UCHAR ucStatus; - - /* Get the NMI Flag */ - ucStatus = READ_PORT_UCHAR((PUCHAR)0x61); - - /* Display NMI failure string */ - HalDisplayString ("\n*** Hardware Malfunction\n\n"); - HalDisplayString ("Call your hardware vendor for support\n\n"); - - /* Check for parity error */ - if (ucStatus & 0x80) - { - /* Display message */ - HalDisplayString ("NMI: Parity Check / Memory Parity Error\n"); - } - - /* Check for I/O failure */ - if (ucStatus & 0x40) - { - /* Display message */ - HalDisplayString ("NMI: Channel Check / IOCHK\n"); - } - - /* Halt the system */ - HalDisplayString("\n*** The system has halted ***\n"); - //KeEnterKernelDebugger(); -} - -/* - * @implemented - */ -UCHAR -FASTCALL -HalSystemVectorDispatchEntry(IN ULONG Vector, - OUT PKINTERRUPT_ROUTINE **FlatDispatch, - OUT PKINTERRUPT_ROUTINE *NoConnection) -{ - /* Not implemented on x86 */ - return FALSE; -} - -VOID -NTAPI -HalBugCheckSystem (PVOID ErrorRecord) -{ - UNIMPLEMENTED; -} - - -/* - * @implemented - */ -VOID -NTAPI -KeFlushWriteBuffer(VOID) -{ - /* Not implemented on x86 */ - return; + UNIMPLEMENTED; } LARGE_INTEGER @@ -189,3 +103,10 @@ return FALSE; } +VOID +NTAPI +HalpCalibrateStallExecution(VOID) +{ + UNIMPLEMENTED; +} + Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/halinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/generic/halinit.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/halinit.c [iso-8859-1] Sat Apr 10 17:00:03 2010 @@ -134,6 +134,7 @@ return PhysicalAddress; } +// FIXME: bugs! PVOID NTAPI HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress, @@ -161,7 +162,7 @@ { /* Get the PTE for this address and check if it's available */ PointerPte = HalAddressToPte(VirtualAddress); - if (*(PULONG)PointerPte) + if (*(PULONG_PTR)PointerPte) { /* PTE has data, skip it and start with a new base address */ BaseAddress = (PVOID)((ULONG_PTR)VirtualAddress + PAGE_SIZE); @@ -373,6 +374,7 @@ HalpInitBusHandler(); #ifndef _MINIHAL_ +#ifdef _M_IX86 /* Enable IRQ 0 */ HalpEnableInterruptHandler(IDT_DEVICE, 0, @@ -380,7 +382,7 @@ CLOCK2_LEVEL, HalpClockInterrupt, Latched); - +#endif /* Enable IRQ 8 */ HalpEnableInterruptHandler(IDT_DEVICE, 0, Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c [iso-8859-1] Sat Apr 10 17:00:03 2010 @@ -211,6 +211,7 @@ __writeeflags(Flags); } +#ifdef _M_IX86 VOID NTAPI HalpSetInterruptGate(ULONG index, PVOID address) @@ -231,6 +232,7 @@ idt->Access = Access.Value; idt->ExtendedOffset = (USHORT)((ULONG_PTR)address >> 16); } +#endif /* FUNCTIONS *****************************************************************/ Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/usage.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/generic/usage.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/usage.c [iso-8859-1] Sat Apr 10 17:00:03 2010 @@ -517,9 +517,14 @@ /* Register the vector */ HalpRegisterVector(Flags, BusVector, SystemVector, Irql); +// FIXME use an architecture specific inline function +#ifdef _M_IX86 /* Connect the interrupt */ ((PKIPCR)KeGetPcr())->IDT[Entry].ExtendedOffset = (USHORT)(((ULONG_PTR)Handler >> 16) & 0xFFFF); ((PKIPCR)KeGetPcr())->IDT[Entry].Offset = (USHORT)((ULONG_PTR)Handler); +#else + // TODO +#endif /* Enable the interrupt */ HalEnableSystemInterrupt(SystemVector, Irql, Mode); Modified: branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] Sat Apr 10 17:00:03 2010 @@ -36,7 +36,8 @@ </directory> </if> <if property="ARCH" value="amd64"> - <include base="x86emu">.</include> + <define name="_X86BIOS_" /> + <include base="x86emu">.</include> <directory name="amd64"> <file>x86bios.c</file> <file>halinit.c</file> @@ -48,11 +49,6 @@ </directory> </if> </directory> - <if property="ARCH" value="amd64"> - <directory name="mp"> - <file>apic.c</file> - </directory> - </if> <directory name="include"> <pch>hal.h</pch> </directory> @@ -75,7 +71,6 @@ <file>sysbus.c</file> </directory> <file>beep.c</file> - <file>bios.c</file> <file>cmos.c</file> <file>dma.c</file> <file>display.c</file> @@ -88,6 +83,7 @@ <file>timer.c</file> <file>usage.c</file> <if property="ARCH" value="i386"> + <file>bios.c</file> <directory name="i386"> <file>portio.c</file> <file>systimer.S</file> Modified: branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild [iso-8859-1] Sat Apr 10 17:00:03 2010 @@ -12,17 +12,25 @@ <define name="_X86BIOS_" /> <library>hal_generic</library> <library>hal_generic_acpi</library> - <library>hal_generic_mp</library> <library>ntoskrnl</library> <library>x86emu</library> - <directory name="mp"> + <directory name="generic"> + <file>spinlock.c</file> + </directory> + + <directory name="up"> + <file>processor.c</file> + </directory> + + <!-- directory name="mp"> <file>halinit_mp.c</file> + <file>processor_mp.c</file> <file>halmp.rc</file> <directory name="amd64"> - <file>mps.S</file> + <!-- file>mps.S</file --> </directory> - </directory> + </directory --> </module> </group>
14 years, 8 months
1
0
0
0
[gschneider] 46814: [SHELL32] Handle WM_CLOSE instead of WM_DESTROY to close the dialog See issue #4226 for more details.
by gschneider@svn.reactos.org
Author: gschneider Date: Sat Apr 10 16:58:31 2010 New Revision: 46814 URL:
http://svn.reactos.org/svn/reactos?rev=46814&view=rev
Log: [SHELL32] Handle WM_CLOSE instead of WM_DESTROY to close the dialog See issue #4226 for more details. Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/she_ocme…
============================================================================== --- trunk/reactos/dll/win32/shell32/she_ocmenu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/she_ocmenu.c [iso-8859-1] Sat Apr 10 16:58:31 2010 @@ -756,7 +756,7 @@ break; } break; - case WM_DESTROY: + case WM_CLOSE: FreeListItems(hwndDlg); EndDialog(hwndDlg, 0); return TRUE;
14 years, 8 months
1
0
0
0
[spetreolle] 46813: Add declaration for PerfDataGetProcessIndex. Fixes taskmgr build without compilation units.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Sat Apr 10 16:12:54 2010 New Revision: 46813 URL:
http://svn.reactos.org/svn/reactos?rev=46813&view=rev
Log: Add declaration for PerfDataGetProcessIndex. Fixes taskmgr build without compilation units. Modified: trunk/reactos/base/applications/taskmgr/perfdata.h Modified: trunk/reactos/base/applications/taskmgr/perfdata.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/perfdata.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/perfdata.h [iso-8859-1] Sat Apr 10 16:12:54 2010 @@ -60,6 +60,7 @@ void PerfDataRefresh(void); BOOL PerfDataGet(ULONG Index, PPERFDATA *lppData); +ULONG PerfDataGetProcessIndex(ULONG pid); ULONG PerfDataGetProcessCount(void); ULONG PerfDataGetProcessorUsage(void); ULONG PerfDataGetProcessorSystemUsage(void);
14 years, 8 months
1
0
0
0
[gschneider] 46812: [TASKMGR] - Add routine to query process index from performance data - Remove process page index caching, query the index using the new routine - Fixes "ghost processes" in the task manager, which were shown due to data access with invalid indexes - Some changes for improved performance: use local process id's where suitable, only start checking for new processes if the item performance data and listview counts differ See issue #4661 for more details.
by gschneider@svn.reactos.org
Author: gschneider Date: Sat Apr 10 14:49:41 2010 New Revision: 46812 URL:
http://svn.reactos.org/svn/reactos?rev=46812&view=rev
Log: [TASKMGR] - Add routine to query process index from performance data - Remove process page index caching, query the index using the new routine - Fixes "ghost processes" in the task manager, which were shown due to data access with invalid indexes - Some changes for improved performance: use local process id's where suitable, only start checking for new processes if the item performance data and listview counts differ See issue #4661 for more details. Modified: trunk/reactos/base/applications/taskmgr/perfdata.c trunk/reactos/base/applications/taskmgr/procpage.c Modified: trunk/reactos/base/applications/taskmgr/perfdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] Sat Apr 10 14:49:41 2010 @@ -356,6 +356,29 @@ LeaveCriticalSection(&PerfDataCriticalSection); } +ULONG PerfDataGetProcessIndex(ULONG pid) +{ + ULONG idx; + + EnterCriticalSection(&PerfDataCriticalSection); + + for (idx = 0; idx < ProcessCount; idx++) + { + if (PtrToUlong(pPerfData[idx].ProcessId) == pid) + { + break; + } + } + + LeaveCriticalSection(&PerfDataCriticalSection); + + if (idx == ProcessCount) + { + return -1; + } + return idx; +} + ULONG PerfDataGetProcessCount(void) { return ProcessCount; Modified: trunk/reactos/base/applications/taskmgr/procpage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/procpage.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/procpage.c [iso-8859-1] Sat Apr 10 14:49:41 2010 @@ -28,7 +28,6 @@ typedef struct { - ULONG Index; ULONG ProcessId; } PROCESS_PAGE_LIST_ITEM, *LPPROCESS_PAGE_LIST_ITEM; @@ -67,7 +66,7 @@ item.iItem = i; (void)ListView_GetItem(hProcessPageListCtrl, &item); pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam; - if (PerfDataGetProcessId(pData->Index) == dwProcessId) + if (pData->ProcessId == dwProcessId) { return i; } @@ -92,7 +91,7 @@ (void)ListView_GetItem(hProcessPageListCtrl, &lvitem); if (lvitem.lParam) - return PerfDataGetProcessId(((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->Index); + return ((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->ProcessId; } return 0; @@ -240,7 +239,7 @@ break; pData = (LPPROCESS_PAGE_LIST_ITEM)pnmdi->item.lParam; - Index = pData->Index; + Index = PerfDataGetProcessIndex(pData->ProcessId); ColumnIndex = pnmdi->item.iSubItem; PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, pnmdi->item.cchTextMax); @@ -435,7 +434,7 @@ { int i; ULONG l; - LV_ITEM item; + LV_ITEM item; LPPROCESS_PAGE_LIST_ITEM pData; /* Remove old processes */ @@ -452,10 +451,17 @@ HeapFree(GetProcessHeap(), 0, pData); } } - for (l = 0; l < PerfDataGetProcessCount(); l++) - { - AddProcess(l); - } + + /* Check for difference in listview process and performance process counts */ + if (ListView_GetItemCount(hProcessPageListCtrl) != PerfDataGetProcessCount()) + { + /* Add new processes by checking against the current items */ + for (l = 0; l < PerfDataGetProcessCount(); l++) + { + AddProcess(l); + } + } + if (TaskManagerSettings.SortColumn != -1) { (void)ListView_SortItems(hProcessPageListCtrl, ProcessPageCompareFunc, NULL); @@ -503,7 +509,7 @@ item.iItem = i; (void)ListView_GetItem(hProcessPageListCtrl, &item); pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam; - if (PerfDataGetProcessId(pData->Index) == pid) + if (pData->ProcessId == pid) { bAlreadyInList = TRUE; break; @@ -512,7 +518,6 @@ if (!bAlreadyInList) /* Add */ { pData = (LPPROCESS_PAGE_LIST_ITEM)HeapAlloc(GetProcessHeap(), 0, sizeof(PROCESS_PAGE_LIST_ITEM)); - pData->Index = Index; pData->ProcessId = pid; /* Add the item to the list */ @@ -707,6 +712,8 @@ int ret = 0; LPPROCESS_PAGE_LIST_ITEM Param1; LPPROCESS_PAGE_LIST_ITEM Param2; + ULONG IndexParam1; + ULONG IndexParam2; WCHAR text1[260]; WCHAR text2[260]; ULONG l1; @@ -725,165 +732,167 @@ Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam2; Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam1; } + IndexParam1 = PerfDataGetProcessIndex(Param1->ProcessId); + IndexParam2 = PerfDataGetProcessIndex(Param2->ProcessId); if (TaskManagerSettings.SortColumn == COLUMN_IMAGENAME) { - PerfDataGetImageName(Param1->Index, text1, sizeof (text1) / sizeof (*text1)); - PerfDataGetImageName(Param2->Index, text2, sizeof (text2) / sizeof (*text2)); + PerfDataGetImageName(IndexParam1, text1, sizeof (text1) / sizeof (*text1)); + PerfDataGetImageName(IndexParam2, text2, sizeof (text2) / sizeof (*text2)); ret = _wcsicmp(text1, text2); } else if (TaskManagerSettings.SortColumn == COLUMN_PID) { - l1 = PerfDataGetProcessId(Param1->Index); - l2 = PerfDataGetProcessId(Param2->Index); + l1 = Param1->ProcessId; + l2 = Param2->ProcessId; ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_USERNAME) { - PerfDataGetUserName(Param1->Index, text1, sizeof (text1) / sizeof (*text1)); - PerfDataGetUserName(Param2->Index, text2, sizeof (text2) / sizeof (*text2)); + PerfDataGetUserName(IndexParam1, text1, sizeof (text1) / sizeof (*text1)); + PerfDataGetUserName(IndexParam2, text2, sizeof (text2) / sizeof (*text2)); ret = _wcsicmp(text1, text2); } else if (TaskManagerSettings.SortColumn == COLUMN_SESSIONID) { - l1 = PerfDataGetSessionId(Param1->Index); - l2 = PerfDataGetSessionId(Param2->Index); + l1 = PerfDataGetSessionId(IndexParam1); + l2 = PerfDataGetSessionId(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_CPUUSAGE) { - l1 = PerfDataGetCPUUsage(Param1->Index); - l2 = PerfDataGetCPUUsage(Param2->Index); + l1 = PerfDataGetCPUUsage(IndexParam1); + l2 = PerfDataGetCPUUsage(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_CPUTIME) { - time1 = PerfDataGetCPUTime(Param1->Index); - time2 = PerfDataGetCPUTime(Param2->Index); + time1 = PerfDataGetCPUTime(IndexParam1); + time2 = PerfDataGetCPUTime(IndexParam2); ret = largeintcmp(time1, time2); } else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGE) { - l1 = PerfDataGetWorkingSetSizeBytes(Param1->Index); - l2 = PerfDataGetWorkingSetSizeBytes(Param2->Index); + l1 = PerfDataGetWorkingSetSizeBytes(IndexParam1); + l2 = PerfDataGetWorkingSetSizeBytes(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_PEAKMEMORYUSAGE) { - l1 = PerfDataGetPeakWorkingSetSizeBytes(Param1->Index); - l2 = PerfDataGetPeakWorkingSetSizeBytes(Param2->Index); + l1 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam1); + l2 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGEDELTA) { - l1 = PerfDataGetWorkingSetSizeDelta(Param1->Index); - l2 = PerfDataGetWorkingSetSizeDelta(Param2->Index); + l1 = PerfDataGetWorkingSetSizeDelta(IndexParam1); + l2 = PerfDataGetWorkingSetSizeDelta(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTS) { - l1 = PerfDataGetPageFaultCount(Param1->Index); - l2 = PerfDataGetPageFaultCount(Param2->Index); + l1 = PerfDataGetPageFaultCount(IndexParam1); + l2 = PerfDataGetPageFaultCount(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTSDELTA) { - l1 = PerfDataGetPageFaultCountDelta(Param1->Index); - l2 = PerfDataGetPageFaultCountDelta(Param2->Index); + l1 = PerfDataGetPageFaultCountDelta(IndexParam1); + l2 = PerfDataGetPageFaultCountDelta(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_VIRTUALMEMORYSIZE) { - l1 = PerfDataGetVirtualMemorySizeBytes(Param1->Index); - l2 = PerfDataGetVirtualMemorySizeBytes(Param2->Index); + l1 = PerfDataGetVirtualMemorySizeBytes(IndexParam1); + l2 = PerfDataGetVirtualMemorySizeBytes(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_PAGEDPOOL) { - l1 = PerfDataGetPagedPoolUsagePages(Param1->Index); - l2 = PerfDataGetPagedPoolUsagePages(Param2->Index); + l1 = PerfDataGetPagedPoolUsagePages(IndexParam1); + l2 = PerfDataGetPagedPoolUsagePages(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_NONPAGEDPOOL) { - l1 = PerfDataGetNonPagedPoolUsagePages(Param1->Index); - l2 = PerfDataGetNonPagedPoolUsagePages(Param2->Index); + l1 = PerfDataGetNonPagedPoolUsagePages(IndexParam1); + l2 = PerfDataGetNonPagedPoolUsagePages(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_BASEPRIORITY) { - l1 = PerfDataGetBasePriority(Param1->Index); - l2 = PerfDataGetBasePriority(Param2->Index); + l1 = PerfDataGetBasePriority(IndexParam1); + l2 = PerfDataGetBasePriority(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_HANDLECOUNT) { - l1 = PerfDataGetHandleCount(Param1->Index); - l2 = PerfDataGetHandleCount(Param2->Index); + l1 = PerfDataGetHandleCount(IndexParam1); + l2 = PerfDataGetHandleCount(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_THREADCOUNT) { - l1 = PerfDataGetThreadCount(Param1->Index); - l2 = PerfDataGetThreadCount(Param2->Index); + l1 = PerfDataGetThreadCount(IndexParam1); + l2 = PerfDataGetThreadCount(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_USEROBJECTS) { - l1 = PerfDataGetUSERObjectCount(Param1->Index); - l2 = PerfDataGetUSERObjectCount(Param2->Index); + l1 = PerfDataGetUSERObjectCount(IndexParam1); + l2 = PerfDataGetUSERObjectCount(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_GDIOBJECTS) { - l1 = PerfDataGetGDIObjectCount(Param1->Index); - l2 = PerfDataGetGDIObjectCount(Param2->Index); + l1 = PerfDataGetGDIObjectCount(IndexParam1); + l2 = PerfDataGetGDIObjectCount(IndexParam2); ret = CMP(l1, l2); } else if (TaskManagerSettings.SortColumn == COLUMN_IOREADS) { - PerfDataGetIOCounters(Param1->Index, &iocounters1); - PerfDataGetIOCounters(Param2->Index, &iocounters2); + PerfDataGetIOCounters(IndexParam1, &iocounters1); + PerfDataGetIOCounters(IndexParam2, &iocounters2); ull1 = iocounters1.ReadOperationCount; ull2 = iocounters2.ReadOperationCount; ret = CMP(ull1, ull2); } else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITES) { - PerfDataGetIOCounters(Param1->Index, &iocounters1); - PerfDataGetIOCounters(Param2->Index, &iocounters2); + PerfDataGetIOCounters(IndexParam1, &iocounters1); + PerfDataGetIOCounters(IndexParam2, &iocounters2); ull1 = iocounters1.WriteOperationCount; ull2 = iocounters2.WriteOperationCount; ret = CMP(ull1, ull2); } else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHER) { - PerfDataGetIOCounters(Param1->Index, &iocounters1); - PerfDataGetIOCounters(Param2->Index, &iocounters2); + PerfDataGetIOCounters(IndexParam1, &iocounters1); + PerfDataGetIOCounters(IndexParam2, &iocounters2); ull1 = iocounters1.OtherOperationCount; ull2 = iocounters2.OtherOperationCount; ret = CMP(ull1, ull2); } else if (TaskManagerSettings.SortColumn == COLUMN_IOREADBYTES) { - PerfDataGetIOCounters(Param1->Index, &iocounters1); - PerfDataGetIOCounters(Param2->Index, &iocounters2); + PerfDataGetIOCounters(IndexParam1, &iocounters1); + PerfDataGetIOCounters(IndexParam2, &iocounters2); ull1 = iocounters1.ReadTransferCount; ull2 = iocounters2.ReadTransferCount; ret = CMP(ull1, ull2); } else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITEBYTES) { - PerfDataGetIOCounters(Param1->Index, &iocounters1); - PerfDataGetIOCounters(Param2->Index, &iocounters2); + PerfDataGetIOCounters(IndexParam1, &iocounters1); + PerfDataGetIOCounters(IndexParam2, &iocounters2); ull1 = iocounters1.WriteTransferCount; ull2 = iocounters2.WriteTransferCount; ret = CMP(ull1, ull2); } else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHERBYTES) { - PerfDataGetIOCounters(Param1->Index, &iocounters1); - PerfDataGetIOCounters(Param2->Index, &iocounters2); + PerfDataGetIOCounters(IndexParam1, &iocounters1); + PerfDataGetIOCounters(IndexParam2, &iocounters2); ull1 = iocounters1.OtherTransferCount; ull2 = iocounters2.OtherTransferCount; ret = CMP(ull1, ull2);
14 years, 8 months
1
0
0
0
[ekohl] 46811: Enable old access check code until the bug that keeps the device installer from working has been fixed.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Apr 10 13:44:57 2010 New Revision: 46811 URL:
http://svn.reactos.org/svn/reactos?rev=46811&view=rev
Log: Enable old access check code until the bug that keeps the device installer from working has been fixed. Modified: trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=46…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] Sat Apr 10 13:44:57 2010 @@ -377,6 +377,9 @@ } } + +#define OLD_ACCESS_CHECK + BOOLEAN NTAPI SepAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext, @@ -389,6 +392,9 @@ OUT PNTSTATUS AccessStatus) { LUID_AND_ATTRIBUTES Privilege; +#ifdef OLD_ACCESS_CHECK + ACCESS_MASK CurrentAccess, AccessMask; +#endif ACCESS_MASK RemainingAccess; ACCESS_MASK TempAccess; ACCESS_MASK TempGrantedAccess = 0; @@ -426,6 +432,9 @@ if (PreviouslyGrantedAccess) RtlMapGenericMask(&PreviouslyGrantedAccess, GenericMapping); +#ifdef OLD_ACCESS_CHECK + CurrentAccess = PreviouslyGrantedAccess; +#endif /* Initialize remaining access rights */ RemainingAccess = DesiredAccess; @@ -490,6 +499,10 @@ return TRUE; } +#ifdef OLD_ACCESS_CHECK + CurrentAccess = PreviouslyGrantedAccess; +#endif + /* RULE 2: Check token for 'take ownership' privilege */ if (DesiredAccess & WRITE_OWNER) { @@ -505,6 +518,9 @@ /* Adjust access rights */ RemainingAccess &= ~WRITE_OWNER; PreviouslyGrantedAccess |= WRITE_OWNER; +#ifdef OLD_ACCESS_CHECK + CurrentAccess |= WRITE_OWNER; +#endif /* Succeed if there are no more rights to grant */ if (RemainingAccess == 0) @@ -618,6 +634,11 @@ { if (SepSidInToken(Token, Sid)) { +#ifdef OLD_ACCESS_CHECK + *GrantedAccess = 0; + *AccessStatus = STATUS_ACCESS_DENIED; + return FALSE; +#else /* Map access rights from the ACE */ TempAccess = CurrentAce->AccessMask; RtlMapGenericMask(&TempAccess, GenericMapping); @@ -625,18 +646,25 @@ /* Leave if a remaining right must be denied */ if (RemainingAccess & TempAccess) break; +#endif } } else if (CurrentAce->Header.AceType == ACCESS_ALLOWED_ACE_TYPE) { if (SepSidInToken(Token, Sid)) { +#ifdef OLD_ACCESS_CHECK + AccessMask = CurrentAce->AccessMask; + RtlMapGenericMask(&AccessMask, GenericMapping); + CurrentAccess |= AccessMask; +#else /* Map access rights from the ACE */ TempAccess = CurrentAce->AccessMask; RtlMapGenericMask(&TempAccess, GenericMapping); /* Remove granted rights */ RemainingAccess &= ~TempAccess; +#endif } } else @@ -649,6 +677,28 @@ CurrentAce = (PACE)((ULONG_PTR)CurrentAce + CurrentAce->Header.AceSize); } +#ifdef OLD_ACCESS_CHECK + DPRINT("CurrentAccess %08lx\n DesiredAccess %08lx\n", + CurrentAccess, DesiredAccess); + + *GrantedAccess = CurrentAccess & DesiredAccess; + + if ((*GrantedAccess & ~VALID_INHERIT_FLAGS) == + (DesiredAccess & ~VALID_INHERIT_FLAGS)) + { + *AccessStatus = STATUS_SUCCESS; + return TRUE; + } + else + { + DPRINT1("HACK: Should deny access for caller: granted 0x%lx, desired 0x%lx (generic mapping %p).\n", + *GrantedAccess, DesiredAccess, GenericMapping); + //*AccessStatus = STATUS_ACCESS_DENIED; + //return FALSE; + *AccessStatus = STATUS_SUCCESS; + return TRUE; + } +#else DPRINT("DesiredAccess %08lx\nPreviouslyGrantedAccess %08lx\nRemainingAccess %08lx\n", DesiredAccess, PreviouslyGrantedAccess, RemainingAccess); @@ -674,6 +724,7 @@ *AccessStatus = STATUS_SUCCESS; return TRUE; +#endif } static PSID
14 years, 8 months
1
0
0
0
[tkreuzer] 46810: [XDK] - Move WDM version defines to wdm.template.h - Move USE_DMA_MACROS / NO_LEGACY_DRIVERS to wdm.template.h, remove duplicate
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Apr 10 13:32:36 2010 New Revision: 46810 URL:
http://svn.reactos.org/svn/reactos?rev=46810&view=rev
Log: [XDK] - Move WDM version defines to wdm.template.h - Move USE_DMA_MACROS / NO_LEGACY_DRIVERS to wdm.template.h, remove duplicate Modified: branches/header-work/include/xdk/iotypes.h branches/header-work/include/xdk/wdm.template.h Modified: branches/header-work/include/xdk/iotypes.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/iotypes…
============================================================================== --- branches/header-work/include/xdk/iotypes.h [iso-8859-1] (original) +++ branches/header-work/include/xdk/iotypes.h [iso-8859-1] Sat Apr 10 13:32:36 2010 @@ -5,20 +5,6 @@ $endif $if (_WDMDDK_) -#define WDM_MAJORVERSION 0x06 -#define WDM_MINORVERSION 0x00 - -#if defined(_WIN64) - -#ifndef USE_DMA_MACROS -#define USE_DMA_MACROS -#endif - -#ifndef NO_LEGACY_DRIVERS -#define NO_LEGACY_DRIVERS -#endif - -#endif /* defined(_WIN64) */ #define STATUS_CONTINUE_COMPLETION STATUS_SUCCESS @@ -4648,18 +4634,6 @@ USHORT AsUSHORT; } PCI_EXPRESS_PME_REQUESTOR_ID, *PPCI_EXPRESS_PME_REQUESTOR_ID; -#if defined(_WIN64) - -#ifndef USE_DMA_MACROS -#define USE_DMA_MACROS -#endif - -#ifndef NO_LEGACY_DRIVERS -#define NO_LEGACY_DRIVERS -#endif - -#endif /* defined(_WIN64) */ - typedef enum _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR_TYPE { ResourceTypeSingle = 0, ResourceTypeRange, Modified: branches/header-work/include/xdk/wdm.template.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/wdm.tem…
============================================================================== --- branches/header-work/include/xdk/wdm.template.h [iso-8859-1] (original) +++ branches/header-work/include/xdk/wdm.template.h [iso-8859-1] Sat Apr 10 13:32:36 2010 @@ -24,6 +24,9 @@ #ifndef _WDMDDK_ #define _WDMDDK_ + +#define WDM_MAJORVERSION 0x06 +#define WDM_MINORVERSION 0x00 /* Included via ntddk.h? */ #ifndef _NTDDK_ @@ -123,6 +126,15 @@ #endif #endif + +#if defined(_WIN64) +#if !defined(USE_DMA_MACROS) && !defined(_NTHAL_) +#define USE_DMA_MACROS +#endif +#ifndef NO_LEGACY_DRIVERS +#define NO_LEGACY_DRIVERS +#endif +#endif /* defined(_WIN64) */ /* Forward declarations */ struct _IRP; @@ -153,7 +165,7 @@ typedef struct _KTHREAD *PKTHREAD, *PRKTHREAD; typedef struct _CONTEXT *PCONTEXT; -#if defined(USE_DMA_MACROS) && !defined(_NTHAL_) && ( defined(_NTDDK_) || defined(_NTDRIVER_) || defined(_NTOSP_)) +#if defined(USE_DMA_MACROS) && !defined(_NTHAL_) typedef struct _DMA_ADAPTER *PADAPTER_OBJECT; #elif defined(_WDM_INCLUDED_) typedef struct _DMA_ADAPTER *PADAPTER_OBJECT;
14 years, 8 months
1
0
0
0
[gadamopoulos] 46809: [rbuild] MSVC backend: - Fix compilation when using paths with spaces - Fix spec and pspec rules to generate correctly the def and stubs file - Group auto-generated files together - Rename some user macros to more appropriate names - Some cleanup
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sat Apr 10 11:14:18 2010 New Revision: 46809 URL:
http://svn.reactos.org/svn/reactos?rev=46809&view=rev
Log: [rbuild] MSVC backend: - Fix compilation when using paths with spaces - Fix spec and pspec rules to generate correctly the def and stubs file - Group auto-generated files together - Rename some user macros to more appropriate names - Some cleanup Modified: trunk/reactos/tools/rbuild/backend/msvc/projmaker.cpp trunk/reactos/tools/rbuild/backend/msvc/s_as_mscpp.rules trunk/reactos/tools/rbuild/backend/msvc/spec.rules trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp trunk/reactos/tools/rbuild/backend/msvc/vspropsmaker.cpp Modified: trunk/reactos/tools/rbuild/backend/msvc/projmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/projmaker.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/projmaker.cpp [iso-8859-1] Sat Apr 10 11:14:18 2010 @@ -69,6 +69,20 @@ ProjMaker::_generate_user_configuration() { #if 0 + string computername; + string username; + string vcproj_file_user = ""; + + if (getenv ( "USERNAME" ) != NULL) + username = getenv ( "USERNAME" ); + if (getenv ( "COMPUTERNAME" ) != NULL) + computername = getenv ( "COMPUTERNAME" ); + else if (getenv ( "HOSTNAME" ) != NULL) + computername = getenv ( "HOSTNAME" ); + + if ((computername != "") && (username != "")) + vcproj_file_user = vcproj_file + "." + computername + "." + username + ".user"; + /* User configuration file */ if (vcproj_file_user != "") { Modified: trunk/reactos/tools/rbuild/backend/msvc/s_as_mscpp.rules URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/s_as_mscpp.rules [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/s_as_mscpp.rules [iso-8859-1] Sat Apr 10 11:14:18 2010 @@ -7,7 +7,7 @@ <CustomBuildRule Name="s_as_mscpp" DisplayName="s (gnu_as mscpp)" - CommandLine="cl /nologo /E [sIncPaths] [sPPDefs] $(InputPath) | $(RosBE)\i386\bin\as -o [sOutF]" + CommandLine="cl /nologo /E [sIncPaths] [sPPDefs] "$(InputPath)" | "$(RosBE)\i386\bin\as" -o [sOutF]" Outputs="[$sOutF]" FileExtensions="*.s" ExecutionDescription="Assembling " Modified: trunk/reactos/tools/rbuild/backend/msvc/spec.rules URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/spec.rules [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/spec.rules [iso-8859-1] Sat Apr 10 11:14:18 2010 @@ -7,26 +7,33 @@ <CustomBuildRule Name="spec" DisplayName="Spec" - CommandLine="$(Tools)\winebuild\winebuild.exe -o "[$Output]" --def -k -E [inputs]" - Outputs="[$Output]" + CommandLine=""$(Tools)\winebuild\winebuild.exe" -F $(TargetFileName) -o [DefFile] --def -k -E [inputs] | "$(Tools)\winebuild\winebuild.exe" -F $(TargetFileName) -o [StubsFile] --pedll -k -E [inputs]" + Outputs="[DefFile]" FileExtensions="*.spec" ExecutionDescription="Generating module definition file" > <Properties> <StringProperty - Name="Output" - DisplayName="Output" + Name="DefFile" + DisplayName="DefFile" Description="The path of the def file" - Switch="[value]" + Switch=""[value]"" DefaultValue="$(IntDir)\$(InputName).def" + /> + <StringProperty + Name="StubsFile" + DisplayName="StubsFile" + Description="The path of the spec file" + Switch=""[value]"" + DefaultValue="$(IntDir)\$(InputName).stubs.c" /> </Properties> </CustomBuildRule> <CustomBuildRule Name="Pspec" DisplayName="pspec" - CommandLine="cl /nologo /E [includes] [inputs] > "[Specfile]" | $(Tools)\winebuild\winebuild.exe -o "[Output]" --def -k -E "[Specfile]"" - Outputs=""[$Output]"" + CommandLine="cl /nologo /EP [includes] [inputs] > [Specfile]" + Outputs="[Specfile]" FileExtensions="*.pspec" ExecutionDescription="Generating module definition file" > @@ -38,17 +45,10 @@ Delimited="true" /> <StringProperty - Name="Output" - DisplayName="Output" - Description="The path to the def file" - Switch="[value]" - DefaultValue="$(IntDir)/$(InputName).def" - /> - <StringProperty Name="Specfile" DisplayName="Spec file" Description="Spec file" - Switch="[value]" + Switch=""[value]"" DefaultValue="$(IntDir)\$(InputName).spec" /> </Properties> Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] Sat Apr 10 11:14:18 2010 @@ -90,11 +90,11 @@ } else if(file->directory == IntermediateDirectory) { - return std::string("$(obj)\\") + file->relative_path; + return std::string("$(RootIntDir)\\") + file->relative_path; } else if(file->directory == OutputDirectory) { - return std::string("$(out)\\") + file->relative_path; + return std::string("$(RootOutDir)\\") + file->relative_path; } return std::string(""); @@ -106,9 +106,6 @@ VCProjMaker::_generate_proj_file ( const Module& module ) { size_t i; - - string computername; - string username; // make sure the containers are empty header_files.clear(); @@ -116,42 +113,24 @@ libraries.clear(); common_defines.clear(); - if (getenv ( "USERNAME" ) != NULL) - username = getenv ( "USERNAME" ); - if (getenv ( "COMPUTERNAME" ) != NULL) - computername = getenv ( "COMPUTERNAME" ); - else if (getenv ( "HOSTNAME" ) != NULL) - computername = getenv ( "HOSTNAME" ); - - string vcproj_file_user = ""; - - if ((computername != "") && (username != "")) - vcproj_file_user = vcproj_file + "." + computername + "." + username + ".user"; - printf ( "Creating MSVC project: '%s'\n", vcproj_file.c_str() ); string path_basedir = module.GetPathToBaseDir (); - string vcdir; - - - if ( configuration.UseVSVersionInPath ) - { - vcdir = DEF_SSEP + _get_vc_dir(); - } bool include_idl = false; - vector<string> source_files, resource_files; - vector<const IfableData*> ifs_list; - - const IfableData& data = module.non_if_data/**ifs_list.back()*/; + vector<string> source_files, resource_files, generated_files; + + const IfableData& data = module.non_if_data; const vector<File*>& files = data.files; for ( i = 0; i < files.size(); i++ ) { string path = _get_file_path(&files[i]->file, module.output->relative_path); string file = path + std::string("\\") + files[i]->file.name; - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) + if (files[i]->file.directory != SourceDirectory) + generated_files.push_back ( file ); + else if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) resource_files.push_back ( file ); else if ( !stricmp ( Right(file,2).c_str(), ".h" ) ) header_files.push_back ( file ); @@ -176,7 +155,7 @@ const vector<Library*>& libs = data.libraries; for ( i = 0; i < libs.size(); i++ ) { - string libpath = "$(out)\\" + libs[i]->importedModule->output->relative_path + "\\" + _get_vc_dir() + "\\$(ConfigurationName)\\" + libs[i]->name + ".lib"; + string libpath = "$(RootOutDir)\\" + libs[i]->importedModule->output->relative_path + "\\" + _get_vc_dir() + "\\$(ConfigurationName)\\" + libs[i]->name + ".lib"; libraries.push_back ( libpath ); } const vector<Define*>& defs = data.defines; @@ -197,10 +176,20 @@ baseaddr = prop.value; } - if(module.IsSpecDefinitionFile()) - { - std::string path = _get_file_path(module.importLibrary->source, module.output->relative_path); - source_files.push_back ( path + std::string("\\") + module.importLibrary->source->name ); + if(module.importLibrary) + { + std::string ImportLibraryPath = _get_file_path(module.importLibrary->source, module.output->relative_path); + + switch (module.IsSpecDefinitionFile()) + { + case PSpec: + generated_files.push_back("$(IntDir)\\" + ReplaceExtension(module.importLibrary->source->name,".spec")); + case Spec: + generated_files.push_back("$(IntDir)\\" + ReplaceExtension(module.importLibrary->source->name,".stubs.c")); + generated_files.push_back("$(IntDir)\\" + ReplaceExtension(module.importLibrary->source->name,".def")); + default: + source_files.push_back(ImportLibraryPath + std::string("\\") + module.importLibrary->source->name); + } } fprintf ( OUT, "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\r\n" ); @@ -263,6 +252,19 @@ // Write out the project files fprintf ( OUT, "\t<Files>\r\n" ); + // Generated files + fprintf ( OUT, "\t\t<Filter\r\n" ); + fprintf ( OUT, "\t\t\tName=\"Generated Files\">\r\n" ); + for( i = 0; i < generated_files.size(); i++) + { + string source_file = DosSeparator(generated_files[i]); + + fprintf ( OUT, "\t\t\t<File\r\n"); + fprintf ( OUT, "\t\t\t\tRelativePath=\"%s\">\r\n", source_file.c_str() ); + fprintf ( OUT, "\t\t\t</File>\r\n"); + } + fprintf ( OUT, "\t\t</Filter>\r\n" ); + // Source files fprintf ( OUT, "\t\t<Filter\r\n" ); fprintf ( OUT, "\t\t\tName=\"Source Files\"\r\n" ); @@ -328,9 +330,10 @@ if ((source_file.find(".idl") != string::npos) || ((source_file.find(".asm") != string::npos))) { fprintf ( OUT, "%s\t<FileConfiguration\r\n", indent_tab.c_str() ); - fprintf ( OUT, "%s\t\tName=\"", indent_tab.c_str() ); - fprintf ( OUT, config.name.c_str() ); - fprintf ( OUT, "|Win32\">\r\n" ); + fprintf ( OUT, "%s\t\tName=\"%s|Win32\"\r\n", indent_tab.c_str(),config.name.c_str() ); + fprintf ( OUT, "%s\t\tExcludedFromBuild=\"true\"\r\n",indent_tab.c_str()); + fprintf ( OUT, ">\r\n" ); +#if 0 fprintf ( OUT, "%s\t\t<Tool\r\n", indent_tab.c_str() ); if (source_file.find(".idl") != string::npos) { @@ -364,6 +367,7 @@ fprintf ( OUT, "%s\t\t\tCommandLine=\"nasmw $(InputPath) -f coff -o "$(OutDir)\\$(InputName).obj"\"\r\n", indent_tab.c_str() ); fprintf ( OUT, "%s\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n", indent_tab.c_str() ); } +#endif fprintf ( OUT, "%s\t</FileConfiguration>\r\n", indent_tab.c_str() ); } //} @@ -429,6 +433,11 @@ size_t i; string intermediatedir = ""; string importLib; + + if ( configuration.UseVSVersionInPath ) + { + vcdir = DEF_SSEP + _get_vc_dir(); + } if(module.IsSpecDefinitionFile()) { @@ -456,23 +465,18 @@ else CfgType = ConfigUnknown; - if ( configuration.UseVSVersionInPath ) - { - vcdir = DEF_SSEP + _get_vc_dir(); - } - fprintf ( OUT, "\t\t<Configuration\r\n" ); fprintf ( OUT, "\t\t\tName=\"%s|Win32\"\r\n", cfg.name.c_str() ); if ( configuration.UseConfigurationInPath ) { - fprintf ( OUT, "\t\t\tOutputDirectory=\"$(out)\\%s%s\\$(ConfigurationName)\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); - fprintf ( OUT, "\t\t\tIntermediateDirectory=\"$(obj)\\%s%s\\$(ConfigurationName)\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); + fprintf ( OUT, "\t\t\tOutputDirectory=\"$(RootOutDir)\\%s%s\\$(ConfigurationName)\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); + fprintf ( OUT, "\t\t\tIntermediateDirectory=\"$(RootIntDir)\\%s%s\\$(ConfigurationName)\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); } else { - fprintf ( OUT, "\t\t\tOutputDirectory=\"$(out)\\%s%s\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); - fprintf ( OUT, "\t\t\tIntermediateDirectory=\"$(obj)\\%s%s\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); + fprintf ( OUT, "\t\t\tOutputDirectory=\"$(RootOutDir)\\%s%s\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); + fprintf ( OUT, "\t\t\tIntermediateDirectory=\"$(RootIntDir)\\%s%s\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); } fprintf ( OUT, "\t\t\tConfigurationType=\"%d\"\r\n", CfgType ); @@ -751,8 +755,6 @@ string outdir; string intdir; - string vcdir; - if ( intenv == "obj-i386" ) intdir = path_basedir + "obj-i386"; /* append relative dir from project dir */ @@ -763,11 +765,6 @@ outdir = path_basedir + "output-i386"; else outdir = outenv; - - if ( configuration.UseVSVersionInPath ) - { - vcdir = DEF_SSEP + _get_vc_dir(); - } fprintf ( OUT, "\t\t<Configuration\r\n" ); fprintf ( OUT, "\t\t\tName=\"%s|Win32\"\r\n", cfg.name.c_str() ); Modified: trunk/reactos/tools/rbuild/backend/msvc/vspropsmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/vspropsmaker.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/vspropsmaker.cpp [iso-8859-1] Sat Apr 10 11:14:18 2010 @@ -148,31 +148,30 @@ const vector<Include*>& incs = data.includes; for ( i = 0; i < incs.size(); i++ ) { - if ((strncmp(incs[i]->directory->relative_path.c_str(), "include\\crt", 11 ) || - strncmp(incs[i]->directory->relative_path.c_str(), "include\\ddk", 11 ) || - strncmp(incs[i]->directory->relative_path.c_str(), "include\\GL", 10 ) || - strncmp(incs[i]->directory->relative_path.c_str(), "include\\psdk", 12 ) || - strncmp(incs[i]->directory->relative_path.c_str(), "include\\reactos\\wine", 20 )) && + if ((incs[i]->directory->relative_path == "include\\crt" || + incs[i]->directory->relative_path == "include\\ddk" || + incs[i]->directory->relative_path == "include\\GL" || + incs[i]->directory->relative_path == "include\\psdk") && ! use_ros_headers) { continue; } if(incs[i]->directory->directory == SourceDirectory) - fprintf ( OUT, ""$(src)\\"); + fprintf ( OUT, "$(RootSrcDir)\\"); else if (incs[i]->directory->directory == IntermediateDirectory) - fprintf ( OUT, ""$(obj)\\"); + fprintf ( OUT, "$(RootIntDir)\\"); else if (incs[i]->directory->directory == OutputDirectory) - fprintf ( OUT, ""$(out)\\"); + fprintf ( OUT, "$(RootOutDir)\\"); else continue; fprintf ( OUT, incs[i]->directory->relative_path.c_str()); - fprintf ( OUT, "" ; "); - } - - fprintf ( OUT, ""$(obj)\\include" ; "); - fprintf ( OUT, ""$(obj)\\include\\reactos" ; "); + fprintf ( OUT, " ; "); + } + + fprintf ( OUT, "$(RootIntDir)\\include ; "); + fprintf ( OUT, "$(RootIntDir)\\include\\reactos ; "); if ( !use_ros_headers ) { @@ -180,9 +179,9 @@ if (getenv ( "BASEDIR" ) != NULL) { string WdkBase = getenv ( "BASEDIR" ); - fprintf ( OUT, ""%s\\inc\\api" ; ", WdkBase.c_str()); - fprintf ( OUT, ""%s\\inc\\crt" ; ", WdkBase.c_str()); - fprintf ( OUT, ""%s\\inc\\ddk" ; ", WdkBase.c_str()); + fprintf ( OUT, "%s\\inc\\api ; ", WdkBase.c_str()); + fprintf ( OUT, "%s\\inc\\crt ; ", WdkBase.c_str()); + fprintf ( OUT, "%s\\inc\\ddk ; ", WdkBase.c_str()); } } fprintf ( OUT, "\"\r\n"); @@ -193,9 +192,6 @@ void PropsMaker::_generate_global_definitions() { - - string global_defines = ""; - fprintf ( OUT, "\t<UserMacro\r\n"); fprintf ( OUT, "\t\tName=\"globalDefines\"\r\n"); fprintf ( OUT, "\t\tValue=\""); @@ -262,10 +258,10 @@ outdir = srcdir + "\\output-i386"; //Generate global macros - _generate_macro("src", srcdir, true); - _generate_macro("out", outdir, true); - _generate_macro("obj", intdir, true); - _generate_macro("Tools", "$(out)\\tools", true); + _generate_macro("RootSrcDir", srcdir, true); + _generate_macro("RootOutDir", outdir, true); + _generate_macro("RootIntDir", intdir, true); + _generate_macro("Tools", "$(RootOutDir)\\tools", true); _generate_macro("RosBE", rosbedir, true); _generate_global_includes();
14 years, 8 months
1
0
0
0
[cgutman] 46808: [NTOSKRNL] - Cache the next instance value in the the registry so we don't have to go searching for an unused instance number every time we add a new device
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Apr 10 06:11:45 2010 New Revision: 46808 URL:
http://svn.reactos.org/svn/reactos?rev=46808&view=rev
Log: [NTOSKRNL] - Cache the next instance value in the the registry so we don't have to go searching for an unused instance number every time we add a new device Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnproot…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c [iso-8859-1] Sat Apr 10 06:11:45 2010 @@ -139,29 +139,19 @@ WCHAR InstancePath[5]; PPNPROOT_DEVICE Device = NULL; NTSTATUS Status; - ULONG i; UNICODE_STRING PathSep = RTL_CONSTANT_STRING(L"\\"); + ULONG NextInstance; + UNICODE_STRING EnumKeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\" REGSTR_PATH_SYSTEMENUM); + HANDLE EnumHandle, DeviceKeyHandle = INVALID_HANDLE_VALUE; + RTL_QUERY_REGISTRY_TABLE QueryTable[2]; + OBJECT_ATTRIBUTES ObjectAttributes; DeviceExtension = PnpRootDeviceObject->DeviceExtension; KeAcquireGuardedMutex(&DeviceExtension->DeviceListLock); DPRINT("Creating a PnP root device for service '%wZ'\n", ServiceName); - /* Search for a free instance ID */ _snwprintf(DevicePath, sizeof(DevicePath) / sizeof(WCHAR), L"%s\\%wZ", REGSTR_KEY_ROOTENUM, ServiceName); - for (i = 0; i < 9999; i++) - { - _snwprintf(InstancePath, sizeof(InstancePath) / sizeof(WCHAR), L"%04lu", i); - Status = LocateChildDevice(DeviceExtension, DevicePath, InstancePath, &Device); - if (Status == STATUS_NO_SUCH_DEVICE) - break; - } - if (i == 9999) - { - DPRINT1("Too much legacy devices reported for service '%wZ'\n", ServiceName); - Status = STATUS_INSUFFICIENT_RESOURCES; - goto cleanup; - } /* Initialize a PNPROOT_DEVICE structure */ Device = ExAllocatePoolWithTag(PagedPool, sizeof(PNPROOT_DEVICE), TAG_PNP_ROOT); @@ -177,6 +167,74 @@ Status = STATUS_NO_MEMORY; goto cleanup; } + + Status = IopOpenRegistryKeyEx(&EnumHandle, NULL, &EnumKeyName, KEY_READ); + if (NT_SUCCESS(Status)) + { + InitializeObjectAttributes(&ObjectAttributes, &Device->DeviceID, OBJ_CASE_INSENSITIVE, EnumHandle, NULL); + Status = ZwCreateKey(&DeviceKeyHandle, KEY_SET_VALUE, &ObjectAttributes, 0, NULL, 0, NULL); + ZwClose(EnumHandle); + } + + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to open registry key\n"); + goto cleanup; + } + +tryagain: + RtlZeroMemory(QueryTable, sizeof(QueryTable)); + QueryTable[0].Name = L"NextInstance"; + QueryTable[0].EntryContext = &NextInstance; + QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, + (PWSTR)DeviceKeyHandle, + QueryTable, + NULL, + NULL); + if (!NT_SUCCESS(Status)) + { + for (NextInstance = 0; NextInstance <= 9999; NextInstance++) + { + _snwprintf(InstancePath, sizeof(InstancePath) / sizeof(WCHAR), L"%04lu", NextInstance); + Status = LocateChildDevice(DeviceExtension, DevicePath, InstancePath, &Device); + if (Status == STATUS_NO_SUCH_DEVICE) + break; + } + + if (NextInstance > 9999) + { + DPRINT1("Too many legacy devices reported for service '%wZ'\n", ServiceName); + Status = STATUS_INSUFFICIENT_RESOURCES; + goto cleanup; + } + } + + _snwprintf(InstancePath, sizeof(InstancePath) / sizeof(WCHAR), L"%04lu", NextInstance); + Status = LocateChildDevice(DeviceExtension, DevicePath, InstancePath, &Device); + if (Status != STATUS_NO_SUCH_DEVICE || NextInstance > 9999) + { + DPRINT1("NextInstance value is corrupt! (%d)\n", NextInstance); + RtlDeleteRegistryValue(RTL_REGISTRY_HANDLE, + (PWSTR)DeviceKeyHandle, + L"NextInstance"); + goto tryagain; + } + + NextInstance++; + Status = RtlWriteRegistryValue(RTL_REGISTRY_HANDLE, + (PWSTR)DeviceKeyHandle, + L"NextInstance", + REG_DWORD, + &NextInstance, + sizeof(NextInstance)); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to write new NextInstance value! (0x%x)\n", Status); + goto cleanup; + } + if (!RtlCreateUnicodeString(&Device->InstanceID, InstancePath)) { Status = STATUS_NO_MEMORY; @@ -243,6 +301,8 @@ RtlFreeUnicodeString(&Device->InstanceID); ExFreePoolWithTag(Device, TAG_PNP_ROOT); } + if (DeviceKeyHandle != INVALID_HANDLE_VALUE) + ZwClose(DeviceKeyHandle); return Status; }
14 years, 8 months
1
0
0
0
[tkreuzer] 46807: fix merge artifact
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Apr 10 02:39:21 2010 New Revision: 46807 URL:
http://svn.reactos.org/svn/reactos?rev=46807&view=rev
Log: fix merge artifact Modified: branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild Modified: branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] Sat Apr 10 02:39:21 2010 @@ -93,7 +93,6 @@ <file>systimer.S</file> </directory> </if> -<<<<<<< .working <if property="ARCH" value="amd64"> <directory name="amd64"> <file>halinit.c</file> @@ -105,9 +104,6 @@ </directory> </if> </directory> -======= - </directory> ->>>>>>> .merge-rechts.r46603 <directory name="up"> <file>halinit_up.c</file> <file>pic.c</file>
14 years, 8 months
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200