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
2025
January
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
August 2008
----- 2025 -----
January 2025
----- 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
27 participants
853 discussions
Start a n
N
ew thread
[tkreuzer] 35644: __readcr3() returns an unsigned __int64, fix x86 MmGetPageDirectory accordingly.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Aug 25 16:24:18 2008 New Revision: 35644 URL:
http://svn.reactos.org/svn/reactos?rev=35644&view=rev
Log: __readcr3() returns an unsigned __int64, fix x86 MmGetPageDirectory accordingly. Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/i386/page.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/i386/page.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Mon Aug 25 16:24:18 2008 @@ -95,7 +95,7 @@ PULONG MmGetPageDirectory(VOID) { - return (PULONG)__readcr3(); + return (PULONG)(ULONG_PTR)__readcr3(); } static ULONG
16 years, 4 months
1
0
0
0
[janderwald] 35643: - Prevent a crash by checking the applet name if it is empty and does exist - %1 is used for file argument, where %2, %3, %n indicate the index of the passed param, %* is the rest of the command - Directly pass the full filename to ShellExecuteExW from the default context menu - Should fix executing cpl in default shellview
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Aug 25 16:02:21 2008 New Revision: 35643 URL:
http://svn.reactos.org/svn/reactos?rev=35643&view=rev
Log: - Prevent a crash by checking the applet name if it is empty and does exist - %1 is used for file argument, where %2, %3, %n indicate the index of the passed param, %* is the rest of the command - Directly pass the full filename to ShellExecuteExW from the default context menu - Should fix executing cpl in default shellview Modified: trunk/reactos/dll/win32/shell32/control.c trunk/reactos/dll/win32/shell32/shlexec.c trunk/reactos/dll/win32/shell32/shv_def_cmenu.c Modified: trunk/reactos/dll/win32/shell32/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/control.…
============================================================================== --- trunk/reactos/dll/win32/shell32/control.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/control.c [iso-8859-1] Mon Aug 25 16:02:21 2008 @@ -427,12 +427,20 @@ sp = 0; } - if ((extraPmts)&&(!spSet)) + if ((extraPmts) && extraPmts[0] &&(!spSet)) { while ((lstrcmpiW(extraPmts, applet->info[sp].szName)) && (sp < applet->count)) sp++; + + if (sp >= applet->count) + { + ReleaseMutex(hMutex); + CloseHandle(hMutex); + Control_UnloadApplet(applet); + HeapFree(GetProcessHeap(), 0, buffer); + return; + } } - if (applet->info[sp].dwSize) { if (!applet->proc(applet->hWnd, CPL_STARTWPARMSA, sp, (LPARAM)extraPmts)) applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData); Modified: trunk/reactos/dll/win32/shell32/shlexec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlexec.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlexec.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlexec.c [iso-8859-1] Mon Aug 25 16:02:21 2008 @@ -129,6 +129,7 @@ used++; if (used < len) *res++ = '"'; + break; } else { @@ -146,7 +147,10 @@ } break; } - /* else fall through */ + else + { + break; + } case '1': if (!done || (*fmt == '1')) { Modified: trunk/reactos/dll/win32/shell32/shv_def_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_def_…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] Mon Aug 25 16:02:21 2008 @@ -1508,6 +1508,8 @@ IDefaultContextMenuImpl *This, LPCMINVOKECOMMANDINFO lpcmi) { + STRRET strFile; + WCHAR szPath[MAX_PATH]; SHELLEXECUTEINFOW sei; PStaticShellEntry pCurrent = This->shead; int verb = LOWORD(lpcmi->lpVerb) - This->iIdSCMFirst; @@ -1520,16 +1522,25 @@ return E_FAIL; + if (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); + return E_FAIL; + } + + if (StrRetToBufW(&strFile, This->dcm.apidl[0], szPath, MAX_PATH) != S_OK) + return E_FAIL; + + ZeroMemory(&sei, sizeof(sei)); sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_CLASSNAME | SEE_MASK_IDLIST; + sei.fMask = SEE_MASK_CLASSNAME; sei.lpClass = pCurrent->szClass; sei.hwnd = lpcmi->hwnd; sei.nShow = SW_SHOWNORMAL; sei.lpVerb = pCurrent->szVerb; - sei.lpIDList = ILCombine(This->dcm.pidlFolder, This->dcm.apidl[0]); + sei.lpFile = szPath; ShellExecuteExW(&sei); - SHFree(sei.lpIDList); return S_OK; }
16 years, 4 months
1
0
0
0
[sserapion] 35642: Convert to spec file.
by sserapion@svn.reactos.org
Author: sserapion Date: Mon Aug 25 15:52:17 2008 New Revision: 35642 URL:
http://svn.reactos.org/svn/reactos?rev=35642&view=rev
Log: Convert to spec file. Added: branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.spec (with props) Removed: branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.def Modified: branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.rbuild Removed: branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.def URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.def [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.def (removed) @@ -1,43 +1,0 @@ -LIBRARY userenv.dll -EXPORTS -InitializeProfiles@0 @100 NONAME -CreateGroupA@8 @101 NONAME -CreateGroupW@8 @102 NONAME -DeleteGroupA@8 @103 NONAME -DeleteGroupW@8 @104 NONAME -AddItemA@36 @105 NONAME -AddItemW@36 @106 NONAME -DeleteItemA@16 @107 NONAME -DeleteItemW@16 @108 NONAME -CreateUserProfileA@8 @109 NONAME -CreateUserProfileW@8 @110 NONAME -CopyProfileDirectoryA@12 @111 NONAME -CopyProfileDirectoryW@12 @112 NONAME -AddDesktopItemA@32 @113 NONAME -AddDesktopItemW@32 @114 NONAME -DeleteDesktopItemA@8 @115 NONAME -DeleteDesktopItemW@8 @116 NONAME -CreateEnvironmentBlock@12 -DestroyEnvironmentBlock@4 -EnterCriticalPolicySection@4 -ExpandEnvironmentStringsForUserA@16 -ExpandEnvironmentStringsForUserW@16 -GetAllUsersProfileDirectoryA@8 -GetAllUsersProfileDirectoryW@8 -GetDefaultUserProfileDirectoryA@8 -GetDefaultUserProfileDirectoryW@8 -GetProfilesDirectoryA@8 -GetProfilesDirectoryW@8 -GetUserProfileDirectoryA@12 -GetUserProfileDirectoryW@12 -LeaveCriticalPolicySection@4 -LoadUserProfileA@8 -LoadUserProfileW@8 -RefreshPolicy@4 -RefreshPolicyEx@8 -RegisterGPNotification@8 -UnloadUserProfile@8 -UnregisterGPNotification@4 -WaitForUserPolicyForegroundProcessing@0 -WaitForMachinePolicyForegroundProcessing@0 -;EOF Modified: branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.rbuild [iso-8859-1] Mon Aug 25 15:52:17 2008 @@ -1,5 +1,5 @@ <module name="userenv" type="win32dll" baseaddress="${BASEADDRESS_USERENV}" installbase="system32" installname="userenv.dll"> - <importlibrary definition="userenv.def" /> + <importlibrary definition="userenv.spec.def" /> <include base="userenv">.</include> <define name="_WIN32_IE">0x0500</define> <define name="_WIN32_WINNT">0x0600</define> @@ -20,4 +20,5 @@ <file>setup.c</file> <file>userenv.c</file> <file>userenv.rc</file> + <file>userenv.spec</file> </module> Added: branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.spec (added) +++ branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.spec [iso-8859-1] Mon Aug 25 15:52:17 2008 @@ -1,0 +1,42 @@ + @ stdcall CreateEnvironmentBlock(ptr ptr long) + @ stdcall DestroyEnvironmentBlock(ptr) + @ stdcall ExpandEnvironmentStringsForUserA(ptr str ptr long) + @ stdcall ExpandEnvironmentStringsForUserW(ptr wstr ptr long) + @ stdcall GetProfilesDirectoryA(ptr ptr) + @ stdcall GetProfilesDirectoryW(ptr ptr) + @ stub GetProfileType + @ stdcall GetUserProfileDirectoryA(ptr ptr ptr) + @ stdcall GetUserProfileDirectoryW(ptr ptr ptr) + @ stdcall LoadUserProfileA(ptr ptr) + @ stdcall LoadUserProfileW(ptr ptr) + @ stdcall RegisterGPNotification(long long) + @ stdcall UnloadUserProfile(ptr ptr) + @ stdcall UnregisterGPNotification(long) +100 stdcall -noname InitializeProfiles() +101 stdcall -noname CreateGroupA(str long) +102 stdcall -noname CreateGroupW(wstr long) +103 stdcall -noname DeleteGroupA(str long) +104 stdcall -noname DeleteGroupW(wstr long) +105 stdcall -noname AddItemA(str long str str str long str long long) +106 stdcall -noname AddItemW(wstr long wstr wstr wstr long wstr long long) +107 stdcall -noname DeleteItemA(str long str long) +108 stdcall -noname DeleteItemW(wstr long wstr long) +109 stdcall -noname CreateUserProfileA(ptr str) +110 stdcall -noname CreateUserProfileW(ptr wstr) +111 stdcall -noname CopyProfileDirectoryA(str str long) +112 stdcall -noname CopyProfileDirectoryW(wstr wstr long) +113 stdcall -noname AddDesktopItemA(long str str str long str long long) +114 stdcall -noname AddDesktopItemW(long wstr wstr wstr long wstr long long) +115 stdcall -noname DeleteDesktopItemA(long str) +116 stdcall -noname DeleteDesktopItemW(long wstr) + @ stdcall EnterCriticalPolicySection(long) + @ stdcall GetAllUsersProfileDirectoryA(str ptr) + @ stdcall GetAllUsersProfileDirectoryW(wstr ptr) + @ stdcall GetDefaultUserProfileDirectoryA(str ptr) + @ stdcall GetDefaultUserProfileDirectoryW(wstr ptr) + @ stdcall LeaveCriticalPolicySection(long) + @ stdcall RefreshPolicy(long) + @ stdcall RefreshPolicyEx(long long) + @ stdcall WaitForUserPolicyForegroundProcessing() + @ stdcall WaitForMachinePolicyForegroundProcessing() + Propchange: branches/ros-amd64-bringup/reactos/dll/win32/userenv/userenv.spec ------------------------------------------------------------------------------ svn:eol-style = native
16 years, 4 months
1
0
0
0
[janderwald] 35641: - Fix multiple bugs in HCR_GetDefaultVerbW
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Aug 25 15:16:42 2008 New Revision: 35641 URL:
http://svn.reactos.org/svn/reactos?rev=35641&view=rev
Log: - Fix multiple bugs in HCR_GetDefaultVerbW Modified: trunk/reactos/dll/win32/shell32/classes.c Modified: trunk/reactos/dll/win32/shell32/classes.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/classes.…
============================================================================== --- trunk/reactos/dll/win32/shell32/classes.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/classes.c [iso-8859-1] Mon Aug 25 15:16:42 2008 @@ -133,7 +133,7 @@ LONG size; HKEY hkey; - TRACE("%p %s %p\n", hkeyClass, debugstr_w(szVerb), szDest); + TRACE("%p %s %p\n", hkeyClass, debugstr_w(szVerb), szDest); if (szVerb) { @@ -143,13 +143,13 @@ size=len; *szDest='\0'; - if (!RegQueryValueW(hkeyClass, swShell, szDest, &size) && *szDest) + if (!RegQueryValueW(hkeyClass, L"shell", szDest, &size) && *szDest) { /* The MSDN says to first try the default verb */ lstrcpyW(sTemp, swShell); lstrcatW(sTemp, szDest); lstrcatW(sTemp, swCommand); - if (!RegOpenKeyExW(hkeyClass, sTemp, 0, 0, &hkey)) + if (!RegOpenKeyExW(hkeyClass, sTemp, 0, KEY_READ, &hkey)) { RegCloseKey(hkey); TRACE("default verb=%s\n", debugstr_w(szDest)); @@ -161,7 +161,7 @@ lstrcpyW(sTemp, swShell); lstrcatW(sTemp, swOpen); lstrcatW(sTemp, swCommand); - if (!RegOpenKeyExW(hkeyClass, sTemp, 0, 0, &hkey)) + if (!RegOpenKeyExW(hkeyClass, sTemp, 0, KEY_READ, &hkey)) { RegCloseKey(hkey); lstrcpynW(szDest, swOpen, len); @@ -170,14 +170,20 @@ } /* and then just use the first verb on Windows >= 2000 */ - if (!RegEnumKeyW(hkeyClass, 0, szDest, len) && *szDest) + if (!RegOpenKeyExW(hkeyClass, L"shell", 0, KEY_READ, &hkey)) { - TRACE("default verb=first verb=%s\n", debugstr_w(szDest)); - return TRUE; - } + if (!RegEnumKeyW(hkey, 0, szDest, len) && *szDest) + { + TRACE("default verb=first verb=%s\n", debugstr_w(szDest)); + RegCloseKey(hkey); + return TRUE; + } + RegCloseKey(hkey); + } + TRACE("no default verb!\n"); - return FALSE; + return FALSE; } BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len )
16 years, 4 months
1
0
0
0
[dreimer] 35640: Small Comment fixes. This should already work now. I just need a final server to upload it.
by dreimer@svn.reactos.org
Author: dreimer Date: Mon Aug 25 14:21:51 2008 New Revision: 35640 URL:
http://svn.reactos.org/svn/reactos?rev=35640&view=rev
Log: Small Comment fixes. This should already work now. I just need a final server to upload it. Modified: trunk/tools/RosBE/RosBE-Windows/Root/update.cmd Modified: trunk/tools/RosBE/RosBE-Windows/Root/update.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/upd…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] Mon Aug 25 14:21:51 2008 @@ -8,14 +8,14 @@ :: @echo off -:: The Update Server +:: The Update Server. set _ROSBE_URL=www.foo.bar :: First check for a new Updater "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/update.cmd "%_ROSBE_BASEDIR%\update.cmd" -:: PS1 Files +:: PS1 Files. if exist "%_ROSBE_BASEDIR%\Build.ps1" ( "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/Build.ps1 ) @@ -35,27 +35,27 @@ "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/rosbe-gcc-env.ps1 ) -:: Options Files +:: Options Files. if exist "%_ROSBE_BASEDIR%\options.cmd" ( "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/options.cmd ) -:: SVN Files +:: SVN Files. if exist "%_ROSBE_BASEDIR%\sSVN.cmd" ( "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/sSVN.cmd ) -:: SCut Files +:: SCut Files. if exist "%_ROSBE_BASEDIR%\scut.cmd" ( "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/scut.cmd ) -:: RelAddr2Line Files +:: RelAddr2Line Files. if exist "%_ROSBE_BASEDIR%\reladdr2line.cmd" ( "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/reladdr2line.cmd ) -:: Other Tools Files +:: Other Tools Files. if exist "%_ROSBE_BASEDIR%\Config.cmd" ( "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/Config.cmd ) @@ -63,6 +63,7 @@ "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/chdefdir.cmd ) +:: Default Files. "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/Build.cmd "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/ChangeLog.txt "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/chdefgcc.cmd @@ -79,7 +80,7 @@ "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/rosbe-gcc-env.cmd "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/TimeDate.cmd -:: Load GCC and Tool SRC packages +:: Add Dates into Vars and load GCC and Tool SRC packages if needed. if exist GCC.7z ( for /f "usebackq" %%i in (`"forfiles /M GCC.7z /C "cmd /c echo @fdate""`) do set _ROSBE_GCCDATE=%%i ) @@ -90,10 +91,11 @@ "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/GCC.7z "%_ROSBE_BASEDIR%\Tools\wget.exe" -N %_ROSBE_URL%/Tools.7z +:: Add the maybe Updated Dates to another Var. for /f "usebackq" %%i in (`"forfiles /M GCC.7z /C "cmd /c echo @fdate""`) do set _ROSBE_GCCDATE2=%%i for /f "usebackq" %%i in (`"forfiles /M Tools.7z /C "cmd /c echo @fdate""`) do set _ROSBE_TOOLSDATE2=%%i -:: Extract GCC +:: Extract GCC. if %_ROSBE_GCCDATE% NEQ %_ROSBE_GCCDATE2% ( "%_ROSBE_BASEDIR%\Tools\7z.exe" x GCC.7z "%_ROSBE_BASEDIR%\4.1.3" ) @@ -104,7 +106,7 @@ copy %TEMP%\*.exe "%_ROSBE_BASEDIR%\Tools" ) -:: Unload Vars +:: Unload Vars. set _ROSBE_URL= set _ROSBE_GCCDATE= set _ROSBE_TOOLSDATE=
16 years, 4 months
1
0
0
0
[tkreuzer] 35639: Merge merge 34713 from ros-amd64-bringup branch: fix NtCurrentTeb()
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Aug 25 14:01:09 2008 New Revision: 35639 URL:
http://svn.reactos.org/svn/reactos?rev=35639&view=rev
Log: Merge merge 34713 from ros-amd64-bringup branch: fix NtCurrentTeb() Modified: trunk/reactos/include/psdk/winnt.h Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=3…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Mon Aug 25 14:01:09 2008 @@ -4145,7 +4145,7 @@ #elif defined (_M_AMD64) FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { - return __readgsqword(FIELD_OFFSET(NT_TIB, Self)); + return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self)); } #else static __inline__ struct _TEB * NtCurrentTeb(void)
16 years, 4 months
1
0
0
0
[sginsberg] 35638: - Remove deprecated CHECKPOINT/CHECKPOINT1 macros which basically translated into DPRINT/DPRINT1("\n")
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Aug 25 13:52:38 2008 New Revision: 35638 URL:
http://svn.reactos.org/svn/reactos?rev=35638&view=rev
Log: - Remove deprecated CHECKPOINT/CHECKPOINT1 macros which basically translated into DPRINT/DPRINT1("\n") Modified: trunk/reactos/base/setup/usetup/bootsup.c trunk/reactos/drivers/filesystems/cdfs/dirctl.c trunk/reactos/drivers/filesystems/fastfat/create.c trunk/reactos/drivers/filesystems/fastfat/dir.c trunk/reactos/drivers/filesystems/fastfat/direntry.c trunk/reactos/drivers/filesystems/fastfat/dirwr.c trunk/reactos/drivers/filesystems/fastfat/fat.c trunk/reactos/drivers/filesystems/fastfat/fcb.c trunk/reactos/drivers/filesystems/fastfat/fsctl.c trunk/reactos/drivers/filesystems/fastfat/rw.c trunk/reactos/drivers/filesystems/fastfat/volume.c trunk/reactos/drivers/setup/blue/blue.c trunk/reactos/hal/halx86/mp/ioapic.c trunk/reactos/lib/fslib/ext2lib/Mke2fs.c trunk/reactos/lib/rtl/dos8dot3.c trunk/reactos/ntoskrnl/ex/shutdown.c trunk/reactos/ntoskrnl/io/iomgr/bootlog.c trunk/reactos/ntoskrnl/mm/balance.c trunk/reactos/ntoskrnl/mm/marea.c trunk/reactos/ntoskrnl/mm/section.c trunk/reactos/subsystems/win32/csrss/win32csr/conio.c trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c trunk/reactos/subsystems/win32/win32k/ntuser/focus.c Modified: trunk/reactos/base/setup/usetup/bootsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/bootsup.…
============================================================================== --- trunk/reactos/base/setup/usetup/bootsup.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/bootsup.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -979,7 +979,6 @@ NtClose(FileHandle); if (!NT_SUCCESS(Status)) { -CHECKPOINT1; RtlFreeHeap(ProcessHeap, 0, OrigBootSector); return(Status); } Modified: trunk/reactos/drivers/filesystems/cdfs/dirctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/d…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -189,7 +189,6 @@ if (FileToFind == NULL || FileToFind->Length == 0) { - CHECKPOINT; RtlInitUnicodeString(&TempString, L"."); FileToFind = &TempString; } Modified: trunk/reactos/drivers/filesystems/fastfat/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -204,7 +204,6 @@ PathNameBuffer = ExAllocatePoolWithTag(NonPagedPool, PathNameBufferLength + sizeof(WCHAR), TAG_VFAT); if (!PathNameBuffer) { - CHECKPOINT1; return STATUS_INSUFFICIENT_RESOURCES; } @@ -263,7 +262,6 @@ Status = RtlUpcaseUnicodeString(&FileToFindUpcase, FileToFindU, TRUE); if (!NT_SUCCESS(Status)) { - CHECKPOINT; ExFreePool(PathNameBuffer); return Status; } Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -478,7 +478,6 @@ */ { NTSTATUS RC = STATUS_SUCCESS; - CHECKPOINT; IrpContext->Irp->IoStatus.Information = 0; switch (IrpContext->MinorFunction) { Modified: trunk/reactos/drivers/filesystems/fastfat/direntry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/direntry.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/direntry.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -205,7 +205,6 @@ if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) { - CHECKPOINT; *pContext = NULL; return STATUS_NO_MORE_ENTRIES; } @@ -230,7 +229,6 @@ if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) { - CHECKPOINT; *pContext = NULL; return STATUS_NO_MORE_ENTRIES; } @@ -328,7 +326,6 @@ if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) { - CHECKPOINT; *pContext = NULL; return STATUS_NO_MORE_ENTRIES; } @@ -440,7 +437,6 @@ if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) { - CHECKPOINT; *pContext = NULL; return STATUS_NO_MORE_ENTRIES; } Modified: trunk/reactos/drivers/filesystems/fastfat/dirwr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/dirwr.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/dirwr.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -137,7 +137,6 @@ if (*start + nbSlots > count) { LARGE_INTEGER AllocationSize; - CHECKPOINT; /* extend the directory */ if (vfatFCBIsRoot(pDirFcb) && DeviceExt->FatInfo.FatType != FAT32) { @@ -270,7 +269,6 @@ if (i == 100) /* FIXME : what to do after this ? */ { ExFreePoolWithTag(Buffer, TAG_VFAT); - CHECKPOINT; return STATUS_UNSUCCESSFUL; } IsNameLegal = RtlIsNameLegalDOS8Dot3(&DirContext.ShortNameU, &NameA, &SpacesFound); @@ -440,7 +438,6 @@ if (DirContext.StartIndex / i == DirContext.DirIndex / i) { /* one cluster */ - CHECKPOINT; CcPinRead(ParentFcb->FileObject, &FileOffset, nbSlots * sizeof(FAT_DIR_ENTRY), TRUE, &Context, (PVOID*)&pFatEntry); if (nbSlots > 1) @@ -452,7 +449,6 @@ else { /* two clusters */ - CHECKPOINT; size = DeviceExt->FatInfo.BytesPerCluster - (DirContext.StartIndex * sizeof(FAT_DIR_ENTRY)) % DeviceExt->FatInfo.BytesPerCluster; i = size / sizeof(FAT_DIR_ENTRY); @@ -533,7 +529,6 @@ if (DirContext.LongNameU.Length / sizeof(WCHAR) > 42) { /* name too long */ - CHECKPOINT; return STATUS_NAME_TOO_LONG; } Modified: trunk/reactos/drivers/filesystems/fastfat/fat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fat.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fat.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -653,7 +653,6 @@ DeviceExt, CurrentCluster); ExAcquireResourceExclusiveLite(&DeviceExt->FatResource, TRUE); - CHECKPOINT; /* * If the file hasn't any clusters allocated then we need special * handling Modified: trunk/reactos/drivers/filesystems/fastfat/fcb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -300,14 +300,12 @@ if (RtlEqualUnicodeString(&FileNameU, FcbNameU, TRUE)) { rcFCB->RefCount++; - CHECKPOINT; return rcFCB; } } } entry = entry->next; } - CHECKPOINT; return NULL; } @@ -536,7 +534,6 @@ newCCB = ExAllocateFromNPagedLookasideList(&VfatGlobalData->CcbLookasideList); if (newCCB == NULL) { - CHECKPOINT; return STATUS_INSUFFICIENT_RESOURCES; } RtlZeroMemory (newCCB, sizeof (VFATCCB)); Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -241,7 +241,6 @@ if (PartitionInfoIsValid && FatInfo.Sectors > PartitionInfo.PartitionLength.QuadPart / FatInfo.BytesPerSector) { - CHECKPOINT1; *RecognizedFS = FALSE; } Modified: trunk/reactos/drivers/filesystems/fastfat/rw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -194,7 +194,6 @@ if (FirstCluster == 1) { // Directory of FAT12/16 needs a special handling - CHECKPOINT; if (ReadOffset.u.LowPart + Length > DeviceExt->FatInfo.rootDirectorySectors * BytesPerSector) { Length = DeviceExt->FatInfo.rootDirectorySectors * BytesPerSector - ReadOffset.u.LowPart; @@ -660,7 +659,6 @@ !(Fcb->Flags & (FCB_IS_PAGE_FILE|FCB_IS_VOLUME))) { // cached read - CHECKPOINT; Status = STATUS_SUCCESS; if (ByteOffset.u.LowPart + Length > Fcb->RFCB.FileSize.u.LowPart) { @@ -668,7 +666,6 @@ Status = /*STATUS_END_OF_FILE*/STATUS_SUCCESS; } - CHECKPOINT; if (IrpContext->FileObject->PrivateCacheMap == NULL) { CcInitializeCacheMap(IrpContext->FileObject, @@ -684,7 +681,6 @@ Status = IrpContext->Irp->IoStatus.Status;//STATUS_PENDING; goto ByeBye; } - CHECKPOINT; if (!NT_SUCCESS(IrpContext->Irp->IoStatus.Status)) { Status = IrpContext->Irp->IoStatus.Status; @@ -693,7 +689,6 @@ else { // non cached read - CHECKPOINT; if (ByteOffset.QuadPart + Length > ROUND_UP(Fcb->RFCB.FileSize.QuadPart, BytesPerSector)) { Length = (ULONG)(ROUND_UP(Fcb->RFCB.FileSize.QuadPart, BytesPerSector) - ByteOffset.QuadPart); @@ -951,7 +946,6 @@ IrpContext->DeviceExt, &AllocationSize); if (!NT_SUCCESS (Status)) { - CHECKPOINT; goto ByeBye; } } @@ -960,7 +954,6 @@ !(Fcb->Flags & (FCB_IS_PAGE_FILE|FCB_IS_VOLUME))) { // cached write - CHECKPOINT; if (IrpContext->FileObject->PrivateCacheMap == NULL) { @@ -984,12 +977,10 @@ { Status = STATUS_UNSUCCESSFUL; } - CHECKPOINT; } else { // non cached write - CHECKPOINT; if (ByteOffset.QuadPart > OldFileSize.QuadPart) { Modified: trunk/reactos/drivers/filesystems/fastfat/volume.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -179,7 +179,6 @@ if (sizeof(DeviceObject->Vpb->VolumeLabel) < FsLabelInfo->VolumeLabelLength) { - CHECKPOINT; return STATUS_NAME_TOO_LONG; } Modified: trunk/reactos/drivers/setup/blue/blue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/setup/blue/blue.c?…
============================================================================== --- trunk/reactos/drivers/setup/blue/blue.c [iso-8859-1] (original) +++ trunk/reactos/drivers/setup/blue/blue.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -627,7 +627,6 @@ offset = (Buf->dwCoord.Y * DeviceExtension->Columns * 2) + (Buf->dwCoord.X * 2); - CHECKPOINT for (dwCount = 0; dwCount < Buf->nLength; dwCount++) { Modified: trunk/reactos/hal/halx86/mp/ioapic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/mp/ioapic.c?rev…
============================================================================== --- trunk/reactos/hal/halx86/mp/ioapic.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/mp/ioapic.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -648,15 +648,13 @@ i, IRQMap[i].IrqType, IRQMap[i].IrqFlag, IRQMap[i].SrcBusId, IRQMap[i].SrcBusIrq, IRQMap[i].DstApicId, IRQMap[i].DstApicInt); - if(1 != HalSetBusDataByOffset(PCIConfiguration, + HalSetBusDataByOffset(PCIConfiguration, IRQMap[i].SrcBusId, (IRQMap[i].SrcBusIrq >> 2) & 0x1f, &IRQMap[i].DstApicInt, 0x3c /*PCI_INTERRUPT_LINE*/, - 1)) - { - CHECKPOINT; - } + 1); + } } } Modified: trunk/reactos/lib/fslib/ext2lib/Mke2fs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/ext2lib/Mke2fs.c…
============================================================================== --- trunk/reactos/lib/fslib/ext2lib/Mke2fs.c [iso-8859-1] (original) +++ trunk/reactos/lib/fslib/ext2lib/Mke2fs.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -813,17 +813,14 @@ EXT2_FILESYS FileSys; ULONG Percent; - CHECKPOINT; Callback(PROGRESS, 0, (PVOID)&Percent); - CHECKPOINT; RtlZeroMemory(&Ext2Sb, sizeof(EXT2_SUPER_BLOCK)); RtlZeroMemory(&FileSys, sizeof(EXT2_FILESYS)); FileSys.ext2_sb = &Ext2Sb; - CHECKPOINT; if (!NT_SUCCESS(Ext2OpenDevice(&FileSys, DriveRoot))) { @@ -831,7 +828,6 @@ goto clean_up; } - CHECKPOINT; if (!NT_SUCCESS(Ext2GetMediaInfo(&FileSys))) { @@ -844,7 +840,6 @@ Ext2Sb.s_blocks_count = FileSys.PartInfo.PartitionLength.QuadPart / EXT2_BLOCK_SIZE(&Ext2Sb); - CHECKPOINT; /* * Calculate number of inodes based on the inode ratio @@ -857,7 +852,6 @@ */ Ext2Sb.s_r_blocks_count = (Ext2Sb.s_blocks_count * 5) / 100; - CHECKPOINT; Status = Ext2LockVolume(&FileSys); if (NT_SUCCESS(Status)) @@ -865,7 +859,6 @@ bLocked = TRUE; } - CHECKPOINT; // Initialize if (!ext2_initialize_sb(&FileSys)) @@ -874,7 +867,6 @@ goto clean_up; } - CHECKPOINT; zap_sector(&FileSys, 2, 6); @@ -999,13 +991,9 @@ } } - CHECKPOINT; Ext2CloseDevice(&FileSys); - CHECKPOINT; - - CHECKPOINT; + Callback(DONE, 0, (PVOID)&bRet); - CHECKPOINT; return Status; } Modified: trunk/reactos/lib/rtl/dos8dot3.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dos8dot3.c?rev=356…
============================================================================== --- trunk/reactos/lib/rtl/dos8dot3.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/dos8dot3.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -162,7 +162,6 @@ (Checksum == Context->Checksum) && (Context->LastIndexValue < 999)) { - CHECKPOINT; Context->LastIndexValue++; if (Context->CheckSumInserted == FALSE && Context->LastIndexValue > 9) @@ -174,7 +173,6 @@ } else { - CHECKPOINT; Context->LastIndexValue = 1; Context->CheckSumInserted = FALSE; } Modified: trunk/reactos/ntoskrnl/ex/shutdown.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/shutdown.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/shutdown.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/shutdown.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -197,7 +197,7 @@ #endif /* CONFIG_SMP */ PopSetSystemPowerState(PowerSystemShutdown); - CHECKPOINT1; + DPRINT1("Shutting down\n"); KiHaltProcessorDpcRoutine(NULL, NULL, NULL, NULL); /* KiHaltProcessor does never return */ Modified: trunk/reactos/ntoskrnl/io/iomgr/bootlog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/bootlog.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/bootlog.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/bootlog.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -337,7 +337,6 @@ BufferSize); if (KeyInfo == NULL) { - CHECKPOINT1; ExReleaseResourceLite(&IopBootLogResource); return; } @@ -354,7 +353,6 @@ &ObjectAttributes); if (!NT_SUCCESS(Status)) { - CHECKPOINT1; ExFreePool(KeyInfo); ExReleaseResourceLite(&IopBootLogResource); return; @@ -381,7 +379,6 @@ if (!NT_SUCCESS(Status)) { - CHECKPOINT1; ZwClose(KeyHandle); ExFreePool(KeyInfo); ExReleaseResourceLite(&IopBootLogResource); @@ -391,7 +388,6 @@ Status = IopWriteLogFile((PWSTR)&KeyInfo->Data); if (!NT_SUCCESS(Status)) { - CHECKPOINT1; ZwClose(KeyHandle); ExFreePool(KeyInfo); ExReleaseResourceLite(&IopBootLogResource); Modified: trunk/reactos/ntoskrnl/mm/balance.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/balance.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -316,7 +316,6 @@ if (Status == STATUS_SUCCESS) { /* MiBalancerEvent */ - CHECKPOINT; while (MmStats.NrFreePages < MiMinimumAvailablePages + 5) { for (i = 0; i < MC_MAXIMUM; i++) @@ -333,7 +332,6 @@ } } InterlockedExchange(&MiBalancerWork, 0); - CHECKPOINT; } else if (Status == STATUS_SUCCESS + 1) { @@ -387,7 +385,6 @@ ; #endif - CHECKPOINT; KeInitializeEvent(&MiBalancerEvent, SynchronizationEvent, FALSE); KeInitializeTimerEx(&MiBalancerTimer, SynchronizationTimer); Modified: trunk/reactos/ntoskrnl/mm/marea.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=35…
============================================================================== --- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -978,14 +978,12 @@ if (!MmGetAddressSpaceOwner(AddressSpace) && *BaseAddress < MmSystemRangeStart) { - CHECKPOINT; return STATUS_ACCESS_VIOLATION; } if (MmGetAddressSpaceOwner(AddressSpace) && (ULONG_PTR)(*BaseAddress) + tmpLength > (ULONG_PTR)MmSystemRangeStart) { - CHECKPOINT; return STATUS_ACCESS_VIOLATION; } Modified: trunk/reactos/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -2036,7 +2036,6 @@ if ((MemoryArea->Flags & SEC_NO_CHANGE) && Region->Protect != Protect) { - CHECKPOINT1; return STATUS_INVALID_PAGE_PROTECTION; } @@ -3686,7 +3685,6 @@ */ if (Protect & ~PAGE_FLAGS_VALID_FROM_USER_MODE) { - CHECKPOINT1; return STATUS_INVALID_PARAMETER_10; } @@ -3700,7 +3698,6 @@ tmpProtect != PAGE_EXECUTE_READWRITE && tmpProtect != PAGE_EXECUTE_WRITECOPY) { - CHECKPOINT1; return STATUS_INVALID_PAGE_PROTECTION; } @@ -4508,7 +4505,6 @@ Protect != PAGE_EXECUTE_READWRITE && Protect != PAGE_EXECUTE_WRITECOPY) { - CHECKPOINT1; return STATUS_INVALID_PAGE_PROTECTION; } @@ -4605,21 +4601,18 @@ if ((Protect & (PAGE_READWRITE|PAGE_EXECUTE_READWRITE)) && !(Section->SectionPageProtection & (PAGE_READWRITE|PAGE_EXECUTE_READWRITE))) { - CHECKPOINT1; return STATUS_SECTION_PROTECTION; } /* check for read access */ if ((Protect & (PAGE_READONLY|PAGE_WRITECOPY|PAGE_EXECUTE_READ|PAGE_EXECUTE_WRITECOPY)) && !(Section->SectionPageProtection & (PAGE_READONLY|PAGE_READWRITE|PAGE_WRITECOPY|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY))) { - CHECKPOINT1; return STATUS_SECTION_PROTECTION; } /* check for execute access */ if ((Protect & (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY)) && !(Section->SectionPageProtection & (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY))) { - CHECKPOINT1; return STATUS_SECTION_PROTECTION; } @@ -4925,7 +4918,6 @@ Protection != PAGE_EXECUTE_READWRITE && Protection != PAGE_EXECUTE_WRITECOPY) { - CHECKPOINT1; return STATUS_INVALID_PAGE_PROTECTION; } Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -574,7 +574,6 @@ CurrentEntry = RemoveHeadList(&Console->InputEvents); if (IsListEmpty(&Console->InputEvents)) { - CHECKPOINT; ResetEvent(Console->ActiveEvent); } Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); Modified: trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -23,10 +23,8 @@ { if (msg == WM_ACTIVATE) { - CHECKPOINT1; if (LOWORD(wParam) != WA_INACTIVE) { - CHECKPOINT1; SetFocus(hWnd); ConioDrawConsole(ActiveConsole); } Modified: trunk/reactos/subsystems/win32/win32k/ntuser/focus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/focus.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/focus.c [iso-8859-1] Mon Aug 25 13:52:38 2008 @@ -136,7 +136,6 @@ /* FIXME: IntIsWindow */ - CHECKPOINT; co_IntPostOrSendMessage(hWnd, WM_NCACTIVATE, (WPARAM)(hWnd == UserGetForegroundWindow()), 0); /* FIXME: WA_CLICKACTIVE */ co_IntPostOrSendMessage(hWnd, WM_ACTIVATE, @@ -251,7 +250,6 @@ /* FIXME: Send WM_ACTIVATEAPP to all thread windows. */ } - CHECKPOINT; co_IntSendSetFocusMessages(hWndFocusPrev, hWndFocus); co_IntSendActivateMessages(hWndPrev, hWnd, MouseActivate);
16 years, 4 months
1
0
0
0
[sginsberg] 35637: - Remove CHECKPOINT macros from green.sys
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Aug 25 13:48:18 2008 New Revision: 35637 URL:
http://svn.reactos.org/svn/reactos?rev=35637&view=rev
Log: - Remove CHECKPOINT macros from green.sys Modified: trunk/rosapps/drivers/green/keyboard.c trunk/rosapps/drivers/green/screen.c Modified: trunk/rosapps/drivers/green/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/drivers/green/keyboard.c?r…
============================================================================== --- trunk/rosapps/drivers/green/keyboard.c [iso-8859-1] (original) +++ trunk/rosapps/drivers/green/keyboard.c [iso-8859-1] Mon Aug 25 13:48:18 2008 @@ -213,7 +213,6 @@ if (!Irp) { /* no memory actually, try later */ - CHECKPOINT; KeStallExecutionProcessor(10); continue; } Modified: trunk/rosapps/drivers/green/screen.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/drivers/green/screen.c?rev…
============================================================================== --- trunk/rosapps/drivers/green/screen.c [iso-8859-1] (original) +++ trunk/rosapps/drivers/green/screen.c [iso-8859-1] Mon Aug 25 13:48:18 2008 @@ -301,7 +301,6 @@ if (!(DeviceExtension->Mode & ENABLE_PROCESSED_OUTPUT)) { /* raw output mode */ - CHECKPOINT; Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; IoCompleteRequest (Irp, IO_NO_INCREMENT); @@ -594,7 +593,6 @@ && ConsoleDraw->SizeX == DeviceExtension->Columns && ConsoleDraw->SizeY == DeviceExtension->Rows) { - CHECKPOINT1; /* search if we need to clear all screen */ DoOptimization = TRUE; Video = (PUCHAR)(ConsoleDraw + 1); @@ -603,14 +601,12 @@ { if (Video[x++] != ' ') { - CHECKPOINT1; DoOptimization = FALSE; } /*if (Video[x++] != DeviceExtension->CharAttribute) DoOptimization = FALSE; */ } if (DoOptimization) { - CHECKPOINT1; AddToSendBuffer(DeviceExtension, 4, ESC, '[', '2', 'J'); } }
16 years, 4 months
1
0
0
0
[tkreuzer] 35636: Merge 34703, 34704, 34705, 34706, 34707, 34708, 34709 and 34710 from ros-amd64-bringup branch: - Fix inline versions of integer <-> pointer conversion functions. - Implement _InterlockedAnd64, _InterlockedOr64, _interlockedbittestandreset64, _interlockedbittestandset64 and gs-segment-adressing functions - As amd64 shares most of the intrinsics of x86, implement them in intrin_x86.h - Fix IMAGE_FIRST_SECTION macro - Implement GetCurrentFiber(), NtCurrentTeb() and YieldProcessor(
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Aug 25 13:47:44 2008 New Revision: 35636 URL:
http://svn.reactos.org/svn/reactos?rev=35636&view=rev
Log: Merge 34703, 34704, 34705, 34706, 34707, 34708, 34709 and 34710 from ros-amd64-bringup branch: - Fix inline versions of integer <-> pointer conversion functions. - Implement _InterlockedAnd64, _InterlockedOr64, _interlockedbittestandreset64, _interlockedbittestandset64 and gs-segment-adressing functions - As amd64 shares most of the intrinsics of x86, implement them in intrin_x86.h - Fix IMAGE_FIRST_SECTION macro - Implement GetCurrentFiber(), NtCurrentTeb() and YieldProcessor() - Fix ENUMRESLANGPROC, ENUMRESNAMEPROC and ENUMRESTYPEPROC - Add Interlocked functions for pointers - Add InterlockedCompareExchangePointer and InterlockedExchangePointer - Add intrinsic port and register access functions fix LIST_ENTRY() macro for 64 bits add size_t definition to _mingw.h (ported from mingw) - Update some loader structs ULONG -> ULONG_PTR / SIZE_T Modified: trunk/reactos/include/crt/_mingw.h trunk/reactos/include/ddk/winddk.h trunk/reactos/include/psdk/basetsd.h trunk/reactos/include/psdk/intrin.h trunk/reactos/include/psdk/intrin_x86.h trunk/reactos/include/psdk/winbase.h trunk/reactos/include/psdk/winnt.h trunk/reactos/include/reactos/rosldr.h trunk/reactos/include/reactos/wine/list.h Modified: trunk/reactos/include/crt/_mingw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/_mingw.h?rev=3…
============================================================================== --- trunk/reactos/include/crt/_mingw.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/_mingw.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -178,6 +178,20 @@ # define __MSVCRT_VERSION__ 0x0600 #endif +#ifndef _SIZE_T_DEFINED +#define _SIZE_T_DEFINED +#undef size_t +#ifdef _WIN64 +#if defined(__GNUC__) && defined(__STRICT_ANSI__) + typedef unsigned int size_t __attribute__ ((mode (DI))); +#else + typedef unsigned __int64 size_t; +#endif +#else + typedef unsigned int size_t; +#endif +#endif + #define __MINGW32_VERSION 3.13 #define __MINGW32_MAJOR_VERSION 3 #define __MINGW32_MINOR_VERSION 13 Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -228,7 +228,7 @@ #define ZwCurrentProcess() NtCurrentProcess() #define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 ) #define ZwCurrentThread() NtCurrentThread() - + #if (_M_IX86) #define KIP0PCRADDRESS 0xffdff000 #endif @@ -5404,7 +5404,7 @@ */ #define PCR_MINOR_VERSION 1 #define PCR_MAJOR_VERSION 1 - + #ifdef _X86_ typedef ULONG PFN_NUMBER, *PPFN_NUMBER; @@ -5493,19 +5493,19 @@ #error Unknown compiler #endif } - + NTHALAPI KIRQL DDKAPI KeGetCurrentIrql( VOID); - + NTKERNELAPI PRKTHREAD NTAPI KeGetCurrentThread( VOID); - + #define KI_USER_SHARED_DATA 0xffdf0000 #elif defined(__x86_64__) @@ -5586,7 +5586,7 @@ #elif defined(_MIPS_) #error MIPS Headers are totally incorrect - + typedef ULONG PFN_NUMBER, *PPFN_NUMBER; #define PASSIVE_LEVEL 0 @@ -5620,16 +5620,16 @@ // NT-ARM is not documented, need DDK-ARM // #include <armddk.h> - + #else #error Unknown architecture #endif - + #define PAGE_SIZE 0x1000 #define PAGE_SHIFT 12L #define SharedUserData ((KUSER_SHARED_DATA * CONST) KI_USER_SHARED_DATA) - + extern NTKERNELAPI PVOID MmHighestUserAddress; extern NTKERNELAPI PVOID MmSystemRangeStart; extern NTKERNELAPI ULONG_PTR MmUserProbeAddress; @@ -5744,8 +5744,12 @@ * IN OUT PVOID VOLATILE *Target, * IN PVOID Value) */ +#if defined (_M_AMD64) +#define InterlockedExchangePointer _InterlockedExchangePointer +#else #define InterlockedExchangePointer(Target, Value) \ ((PVOID) InterlockedExchange((PLONG) Target, (LONG) Value)) +#endif /* * PVOID @@ -5754,8 +5758,12 @@ * IN PVOID Exchange, * IN PVOID Comparand) */ +#if defined (_M_AMD64) +#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer +#else #define InterlockedCompareExchangePointer(Destination, Exchange, Comparand) \ ((PVOID) InterlockedCompareExchange((PLONG) Destination, (LONG) Exchange, (LONG) Comparand)) +#endif #define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b) #define InterlockedIncrementSizeT(a) InterlockedIncrement((LONG *)a) @@ -7569,6 +7577,9 @@ IN PVOID Context ); +/** Io access routines **/ + +#if !defined(_M_AMD64) NTHALAPI VOID NTAPI @@ -7742,6 +7753,244 @@ WRITE_REGISTER_USHORT( IN PUSHORT Register, IN USHORT Value); + +#else + +FORCEINLINE +VOID +READ_PORT_BUFFER_UCHAR( + IN PUCHAR Port, + IN PUCHAR Buffer, + IN ULONG Count) +{ + __inbytestring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +READ_PORT_BUFFER_ULONG( + IN PULONG Port, + IN PULONG Buffer, + IN ULONG Count) +{ + __indwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +READ_PORT_BUFFER_USHORT( + IN PUSHORT Port, + IN PUSHORT Buffer, + IN ULONG Count) +{ + __inwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +UCHAR +READ_PORT_UCHAR( + IN PUCHAR Port) +{ + return __inbyte((USHORT)(ULONG_PTR)Port); +} + +FORCEINLINE +ULONG +READ_PORT_ULONG( + IN PULONG Port) +{ + return __indword((USHORT)(ULONG_PTR)Port); +} + +FORCEINLINE +USHORT +READ_PORT_USHORT( + IN PUSHORT Port) +{ + return __inword((USHORT)(ULONG_PTR)Port); +} + +FORCEINLINE +VOID +READ_REGISTER_BUFFER_UCHAR( + IN PUCHAR Register, + IN PUCHAR Buffer, + IN ULONG Count) +{ + __movsb(Register, Buffer, Count); +} + +FORCEINLINE +VOID +READ_REGISTER_BUFFER_ULONG( + IN PULONG Register, + IN PULONG Buffer, + IN ULONG Count) +{ + __movsd(Register, Buffer, Count); +} + +FORCEINLINE +VOID +READ_REGISTER_BUFFER_USHORT( + IN PUSHORT Register, + IN PUSHORT Buffer, + IN ULONG Count) +{ + __movsw(Register, Buffer, Count); +} + +FORCEINLINE +UCHAR +READ_REGISTER_UCHAR( + IN PUCHAR Register) +{ + return *Register; +} + +FORCEINLINE +ULONG +READ_REGISTER_ULONG( + IN PULONG Register) +{ + return *Register; +} + +FORCEINLINE +USHORT +READ_REGISTER_USHORT( + IN PUSHORT Register) +{ + return *Register; +} + +FORCEINLINE +VOID +WRITE_PORT_BUFFER_UCHAR( + IN PUCHAR Port, + IN PUCHAR Buffer, + IN ULONG Count) +{ + __outbytestring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +WRITE_PORT_BUFFER_ULONG( + IN PULONG Port, + IN PULONG Buffer, + IN ULONG Count) +{ + __outdwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +WRITE_PORT_BUFFER_USHORT( + IN PUSHORT Port, + IN PUSHORT Buffer, + IN ULONG Count) +{ + __outwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +WRITE_PORT_UCHAR( + IN PUCHAR Port, + IN UCHAR Value) +{ + __outbyte((USHORT)(ULONG_PTR)Port, Value); +} + +FORCEINLINE +VOID +WRITE_PORT_ULONG( + IN PULONG Port, + IN ULONG Value) +{ + __outdword((USHORT)(ULONG_PTR)Port, Value); +} + +FORCEINLINE +VOID +WRITE_PORT_USHORT( + IN PUSHORT Port, + IN USHORT Value) +{ + __outword((USHORT)(ULONG_PTR)Port, Value); +} + +FORCEINLINE +VOID +WRITE_REGISTER_BUFFER_UCHAR( + IN PUCHAR Register, + IN PUCHAR Buffer, + IN ULONG Count) +{ + LONG Synch; + __movsb(Register, Buffer, Count); + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_BUFFER_ULONG( + IN PULONG Register, + IN PULONG Buffer, + IN ULONG Count) +{ + LONG Synch; + __movsd(Register, Buffer, Count); + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_BUFFER_USHORT( + IN PUSHORT Register, + IN PUSHORT Buffer, + IN ULONG Count) +{ + LONG Synch; + __movsw(Register, Buffer, Count); + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_UCHAR( + IN PUCHAR Register, + IN UCHAR Value) +{ + LONG Synch; + *Register = Value; + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_ULONG( + IN PULONG Register, + IN ULONG Value) +{ + LONG Synch; + *Register = Value; + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_USHORT( + IN PUSHORT Register, + IN USHORT Value) +{ + LONG Sync; + *Register = Value; + InterlockedOr(&Sync, 1); +} + +#endif /** I/O manager routines **/ @@ -9599,9 +9848,9 @@ DDKAPI KeRaiseIrqlToSynchLevel( VOID); - + #elif defined(_M_ARM) - + #include <armddk.h> #else Modified: trunk/reactos/include/psdk/basetsd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/basetsd.h?rev…
============================================================================== --- trunk/reactos/include/psdk/basetsd.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/basetsd.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -65,37 +65,36 @@ typedef unsigned int UHALF_PTR, *PUHALF_PTR; typedef int HALF_PTR, *PHALF_PTR; -#if 0 /* TODO when WIN64 is here */ -inline unsigned long HandleToUlong(const void* h ) - { return((unsigned long) h ); } -inline long HandleToLong( const void* h ) - { return((long) h ); } -inline void* ULongToHandle( const long h ) +#if !defined(__midl) && !defined(__WIDL__) +static inline unsigned long HandleToUlong(const void* h ) + { return((unsigned long)(ULONG_PTR) h ); } +static inline long HandleToLong( const void* h ) + { return((long)(LONG_PTR) h ); } +static inline void* ULongToHandle( const long h ) { return((void*) (UINT_PTR) h ); } -inline void* LongToHandle( const long h ) +static inline void* LongToHandle( const long h ) { return((void*) (INT_PTR) h ); } -inline unsigned long PtrToUlong( const void* p) - { return((unsigned long) p ); } -inline unsigned int PtrToUint( const void* p ) - { return((unsigned int) p ); } -inline unsigned short PtrToUshort( const void* p ) - { return((unsigned short) p ); } -inline long PtrToLong( const void* p ) - { return((long) p ); } -inline int PtrToInt( const void* p ) - { return((int) p ); } -inline short PtrToShort( const void* p ) - { return((short) p ); } -inline void* IntToPtr( const int i ) +static inline unsigned long PtrToUlong( const void* p) + { return((unsigned long)(ULONG_PTR) p ); } +static inline unsigned int PtrToUint( const void* p ) + { return((unsigned int)(UINT_PTR) p ); } +static inline unsigned short PtrToUshort( const void* p ) + { return((unsigned short)(ULONG_PTR) p ); } +static inline long PtrToLong( const void* p ) + { return((long)(LONG_PTR) p ); } +static inline int PtrToInt( const void* p ) + { return((int)(INT_PTR) p ); } +static inline short PtrToShort( const void* p ) + { return((short)(INT_PTR) p ); } +static inline void* IntToPtr( const int i ) { return( (void*)(INT_PTR)i ); } -inline void* UIntToPtr(const unsigned int ui) +static inline void* UIntToPtr(const unsigned int ui) { return( (void*)(UINT_PTR)ui ); } -inline void* LongToPtr( const long l ) +static inline void* LongToPtr( const long l ) { return( (void*)(LONG_PTR)l ); } -inline void* ULongToPtr( const unsigned long ul ) +static inline void* ULongToPtr( const unsigned long ul ) { return( (void*)(ULONG_PTR)ul ); } -#endif /* 0_ */ - +#endif /* !__midl */ #else /* !_WIN64 */ typedef int INT_PTR, *PINT_PTR; typedef unsigned int UINT_PTR, *PUINT_PTR; Modified: trunk/reactos/include/psdk/intrin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/intrin.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/intrin.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -79,7 +79,7 @@ #include "intrin_arm.h" #elif defined(__x86_64__) /* TODO: the x64 architecture shares most of the i386 intrinsics. It should be easy to support */ -#include "intrin_x86_64.h" +#include "intrin_x86.h" #else #error Unsupported architecture #endif Modified: trunk/reactos/include/psdk/intrin_x86.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin_x86.h?…
============================================================================== --- trunk/reactos/include/psdk/intrin_x86.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/intrin_x86.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -153,6 +153,13 @@ return __sync_fetch_and_and(value, mask); } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) long _InterlockedAnd64(volatile long long * const value, const long long mask) +{ + return __sync_fetch_and_and(value, mask); +} +#endif + static __inline__ __attribute__((always_inline)) char _InterlockedOr8(volatile char * const value, const char mask) { return __sync_fetch_and_or(value, mask); @@ -167,6 +174,13 @@ { return __sync_fetch_and_or(value, mask); } + +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) long _InterlockedOr64(volatile long long * const value, const long long mask) +{ + return __sync_fetch_and_or(value, mask); +} +#endif static __inline__ __attribute__((always_inline)) char _InterlockedXor8(volatile char * const value, const char mask) { @@ -455,6 +469,15 @@ return retval; } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset64(volatile long long * a, const long long b) +{ + unsigned char retval; + __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + return retval; +} +#endif + static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset(volatile long * a, const long b) { unsigned char retval; @@ -462,6 +485,14 @@ return retval; } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset64(volatile long long * a, const long long b) +{ + unsigned char retval; + __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + return retval; +} +#endif /*** String operations ***/ /* NOTE: we don't set a memory clobber in the __stosX functions because Visual C++ doesn't */ @@ -525,7 +556,98 @@ ); } - +#if defined(_M_AMD64) +/*** GS segment addressing ***/ + +static __inline__ __attribute__((always_inline)) void __writegsbyte(const unsigned long Offset, const unsigned char Data) +{ + __asm__("movb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __writegsword(const unsigned long Offset, const unsigned short Data) +{ + __asm__("movw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __writegsdword(const unsigned long Offset, const unsigned long Data) +{ + __asm__("movl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __writegsqword(const unsigned long Offset, const unsigned __int64 Data) +{ + __asm__("movq %q[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) unsigned char __readgsbyte(const unsigned long Offset) +{ + unsigned char value; + __asm__("movb %%gs:%a[Offset], %b[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + return value; +} + +static __inline__ __attribute__((always_inline)) unsigned short __readgsword(const unsigned long Offset) +{ + unsigned short value; + __asm__("movw %%gs:%a[Offset], %w[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + return value; +} + +static __inline__ __attribute__((always_inline)) unsigned long __readgsdword(const unsigned long Offset) +{ + unsigned long value; + __asm__("movl %%gs:%a[Offset], %k[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + return value; +} + +static __inline__ __attribute__((always_inline)) unsigned __int64 __readgsqword(const unsigned long Offset) +{ + unsigned long value; + __asm__("movq %%gs:%a[Offset], %q[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + return value; +} + +static __inline__ __attribute__((always_inline)) void __incgsbyte(const unsigned long Offset) +{ + __asm__("incb %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); +} + +static __inline__ __attribute__((always_inline)) void __incgsword(const unsigned long Offset) +{ + __asm__("incw %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); +} + +static __inline__ __attribute__((always_inline)) void __incgsdword(const unsigned long Offset) +{ + __asm__("incl %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); +} + +/* NOTE: the bizarre implementation of __addgsxxx mimics the broken Visual C++ behavior */ +static __inline__ __attribute__((always_inline)) void __addgsbyte(const unsigned long Offset, const unsigned char Data) +{ + if(!__builtin_constant_p(Offset)) + __asm__("addb %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + else + __asm__("addb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __addgsword(const unsigned long Offset, const unsigned short Data) +{ + if(!__builtin_constant_p(Offset)) + __asm__("addw %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + else + __asm__("addw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __addgsdword(const unsigned long Offset, const unsigned int Data) +{ + if(!__builtin_constant_p(Offset)) + __asm__("addl %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + else + __asm__("addl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +#else /*** FS segment addressing ***/ static __inline__ __attribute__((always_inline)) void __writefsbyte(const unsigned long Offset, const unsigned char Data) { @@ -602,6 +724,7 @@ else __asm__("addl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); } +#endif /*** Bit manipulation ***/ Modified: trunk/reactos/include/psdk/winbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winbase.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winbase.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winbase.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -23,7 +23,7 @@ #define FILE_SYSTEM_NOT_SUPPORT 6 #define FILE_USER_DISALLOWED 7 #define FILE_READ_ONLY 8 -#define FILE_DIR_DISALOWED 9 +#define FILE_DIR_DISALOWED 9 #define COMMPROP_INITIALIZED 0xE73CF52E #define SP_SERIALCOMM 1 @@ -1081,12 +1081,12 @@ typedef DWORD(WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,DWORD,DWORD,HANDLE,HANDLE,LPVOID); typedef void(WINAPI *LPFIBER_START_ROUTINE)(PVOID); typedef VOID (WINAPI *PFLS_CALLBACK_FUNCTION)(PVOID); -typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG); -typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG); -typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG); -typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG); -typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG); -typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG); +typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG_PTR); typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED); typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS); typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; @@ -1707,14 +1707,23 @@ #ifndef __INTERLOCKED_DECLARED #define __INTERLOCKED_DECLARED LONG WINAPI InterlockedCompareExchange(IN OUT LONG volatile *,LONG,LONG); -/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ -#define InterlockedCompareExchangePointer(d,e,c) \ - (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c)) LONG WINAPI InterlockedDecrement(IN OUT LONG volatile *); LONG WINAPI InterlockedExchange(IN OUT LONG volatile *,LONG); -/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ -#define InterlockedExchangePointer(t,v) \ +#if defined(_WIN64) + /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ + #define InterlockedExchangePointer(t,v) \ + (PVOID)InterlockedExchange64((LONGLONG*)(t),(LONGLONG)(v)) + /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ + #define InterlockedCompareExchangePointer(d,e,c) \ + (PVOID)InterlockedCompareExchange64((LONGLONG*)(d),(LONGLONG)(e),(LONGLONG)(c)) +#else + /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ + #define InterlockedExchangePointer(t,v) \ (PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v)) + /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ + #define InterlockedCompareExchangePointer(d,e,c) \ + (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c)) +#endif LONG WINAPI InterlockedExchangeAdd(IN OUT LONG volatile *,LONG); #if (_WIN32_WINNT >= 0x0501) PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER); Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=3…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -1350,7 +1350,7 @@ #define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800 #define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 #define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000 -#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) +#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD_PTR)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) #define IMAGE_DIRECTORY_ENTRY_EXPORT 0 #define IMAGE_DIRECTORY_ENTRY_IMPORT 1 #define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 @@ -2902,7 +2902,7 @@ #endif NTSYSAPI -WORD +WORD NTAPI RtlCaptureStackBackTrace( IN DWORD FramesToSkip, @@ -4090,6 +4090,11 @@ ); return ret; } +#elif defined (_M_AMD64) +FORCEINLINE PVOID GetCurrentFiber(VOID) +{ + return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, FiberData)); +} #elif defined (_M_ARM) PVOID WINAPI GetCurrentFiber(VOID); #else @@ -4130,13 +4135,18 @@ return ret; } #elif _M_ARM - + // // NT-ARM is not documented // #define KIRQL ULONG // Hack! #include <armddk.h> - + +#elif defined (_M_AMD64) +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) +{ + return __readgsqword(FIELD_OFFSET(NT_TIB, Self)); +} #else static __inline__ struct _TEB * NtCurrentTeb(void) { @@ -4267,6 +4277,8 @@ #if defined(_M_IX86) #define YieldProcessor() __asm__ __volatile__("pause"); +#elif defined (_M_AMD64) +#define YieldProcessor() __asm__ __volatile__("pause"); #elif defined(_M_PPC) #define YieldProcessor() __asm__ __volatile__("nop"); #elif defined(_M_MIPS) @@ -4282,6 +4294,19 @@ #define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b) +#define InterlockedAnd _InterlockedAnd +#define InterlockedExchange _InterlockedExchange +#define InterlockedOr _InterlockedOr + +#define InterlockedAnd64 _InterlockedAnd64 +#define InterlockedOr64 _InterlockedOr64 + +#define InterlockedBitTestAndSet _interlockedbittestandset +#define InterlockedBitTestAndSet64 _interlockedbittestandset64 +#define InterlockedBitTestAndReset _interlockedbittestandreset +#define InterlockedBitTestAndReset64 _interlockedbittestandreset64 + + #endif #else Modified: trunk/reactos/include/reactos/rosldr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/rosldr.h?r…
============================================================================== --- trunk/reactos/include/reactos/rosldr.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/rosldr.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -17,34 +17,34 @@ typedef struct _LOADER_MODULE { - ULONG ModStart; - ULONG ModEnd; - ULONG String; - ULONG Reserved; + ULONG_PTR ModStart; + ULONG_PTR ModEnd; + ULONG_PTR String; + ULONG_PTR Reserved; } LOADER_MODULE, *PLOADER_MODULE; typedef struct _ROS_LOADER_PARAMETER_BLOCK { ULONG Flags; - ULONG MemLower; - ULONG MemHigher; + ULONG_PTR MemLower; + ULONG_PTR MemHigher; ULONG BootDevice; PCHAR CommandLine; ULONG ModsCount; PLOADER_MODULE ModsAddr; UCHAR Syms[12]; - ULONG MmapLength; - ULONG MmapAddr; - ULONG RdLength; - ULONG RdAddr; + SIZE_T MmapLength; + ULONG_PTR MmapAddr; + SIZE_T RdLength; + ULONG_PTR RdAddr; ULONG DrivesCount; PARC_DISK_SIGNATURE DrivesAddr; ULONG ConfigTable; ULONG BootLoaderName; - ULONG PageDirectoryStart; - ULONG PageDirectoryEnd; - ULONG KernelBase; - ULONG ArchExtra; + ULONG_PTR PageDirectoryStart; + ULONG_PTR PageDirectoryEnd; + ULONG_PTR KernelBase; + ULONG_PTR ArchExtra; } ROS_LOADER_PARAMETER_BLOCK, *PROS_LOADER_PARAMETER_BLOCK; extern BOOLEAN AcpiTableDetected; Modified: trunk/reactos/include/reactos/wine/list.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/list.…
============================================================================== --- trunk/reactos/include/reactos/wine/list.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/list.h [iso-8859-1] Mon Aug 25 13:47:44 2008 @@ -224,7 +224,12 @@ #define LIST_INIT(list) { &(list), &(list) } /* get pointer to object containing list element */ +#ifdef _WIN64 +#define LIST_ENTRY(elem, type, field) \ + ((type *)((char *)(elem) - (unsigned long long)(&((type *)0)->field))) +#else #define LIST_ENTRY(elem, type, field) \ ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field))) +#endif #endif /* __WINE_SERVER_LIST_H */
16 years, 4 months
1
0
0
0
[sginsberg] 35635: - Use MiSyncForProcessAttach and MiSyncForContextSwitch instead of MiSyncThreadProcessViews to avoid some unneeded mm hack-syncing
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Aug 25 13:42:40 2008 New Revision: 35635 URL:
http://svn.reactos.org/svn/reactos?rev=35635&view=rev
Log: - Use MiSyncForProcessAttach and MiSyncForContextSwitch instead of MiSyncThreadProcessViews to avoid some unneeded mm hack-syncing Modified: trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S trunk/reactos/ntoskrnl/ke/procobj.c trunk/reactos/ntoskrnl/ke/thrdobj.c trunk/reactos/ntoskrnl/ke/thrdschd.c trunk/reactos/ntoskrnl/mm/mm.c Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Mon Aug 25 13:42:40 2008 @@ -1554,12 +1554,18 @@ IN PLIST_ENTRY ListHead ); -/* ReactOS Mm Hack */ +/* ReactOS Mm Hacks */ VOID FASTCALL -MiSyncThreadProcessViews( +MiSyncForProcessAttach( IN PKTHREAD NextThread, IN PEPROCESS Process +); + +VOID +FASTCALL +MiSyncForContextSwitch( + IN PKTHREAD Thread ); extern PMM_AVL_TABLE MmKernelAddressSpace; Modified: trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/ctxswitch…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S [iso-8859-1] Mon Aug 25 13:42:40 2008 @@ -738,8 +738,7 @@ SwapContext: /* ReactOS Mm Hack */ mov ecx, esi - mov edx, [edi+KTHREAD_APCSTATE_PROCESS] - call @MiSyncThreadProcessViews@8 + call @MiSyncForContextSwitch@4 /* Swap context at APC_LEVEL */ mov ecx, APC_LEVEL Modified: trunk/reactos/ntoskrnl/ke/procobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/procobj.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/procobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/procobj.c [iso-8859-1] Mon Aug 25 13:42:40 2008 @@ -448,7 +448,7 @@ ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); /* Check if we're already in that process */ if (Thread->ApcState.Process == Process) return; @@ -574,7 +574,7 @@ ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); /* Crash system if DPC is being executed! */ if (KeIsExecutingDpc()) Modified: trunk/reactos/ntoskrnl/ke/thrdobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdobj.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] Mon Aug 25 13:42:40 2008 @@ -811,7 +811,7 @@ Thread->KernelStackResident = TRUE; /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); /* Enter SEH to avoid crashes due to user mode */ Status = STATUS_SUCCESS; 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] Mon Aug 25 13:42:40 2008 @@ -344,7 +344,7 @@ WaitIrql = CurrentThread->WaitIrql; /* REACTOS Mm Hack of Doom */ - MiSyncThreadProcessViews(NextThread, PsGetCurrentProcess()); + MiSyncForContextSwitch(NextThread); /* Swap contexts */ ApcState = KiSwapContext(CurrentThread, NextThread); @@ -714,7 +714,7 @@ ASSERT(OldIrql <= DISPATCH_LEVEL); /* REACTOS Mm Hack of Doom */ - MiSyncThreadProcessViews(NextThread, PsGetCurrentProcess()); + MiSyncForContextSwitch(NextThread); /* Swap to new thread */ KiSwapContext(Thread, NextThread); Modified: trunk/reactos/ntoskrnl/mm/mm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mm.c?rev=35635…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mm.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mm.c [iso-8859-1] Mon Aug 25 13:42:40 2008 @@ -26,17 +26,31 @@ VOID FASTCALL -MiSyncThreadProcessViews(IN PKTHREAD NextThread, - IN PEPROCESS Process) -{ - PETHREAD Thread = CONTAINING_RECORD(NextThread, ETHREAD, Tcb); +MiSyncForProcessAttach(IN PKTHREAD Thread, + IN PEPROCESS Process) +{ + PETHREAD Ethread = CONTAINING_RECORD(Thread, ETHREAD, Tcb); /* Hack Sync because Mm is broken */ - MmUpdatePageDir(Process, Thread, sizeof(ETHREAD)); - MmUpdatePageDir(Process, Thread->ThreadsProcess, sizeof(EPROCESS)); + MmUpdatePageDir(Process, Ethread->ThreadsProcess, sizeof(EPROCESS)); MmUpdatePageDir(Process, - (PVOID)Thread->Tcb.StackLimit, - NextThread->LargeStack ? + (PVOID)Thread->StackLimit, + Thread->LargeStack ? + KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); +} + +VOID +FASTCALL +MiSyncForContextSwitch(IN PKTHREAD Thread) +{ + PVOID Process = PsGetCurrentProcess(); + PETHREAD Ethread = CONTAINING_RECORD(Thread, ETHREAD, Tcb); + + /* Hack Sync because Mm is broken */ + MmUpdatePageDir(Process, Ethread->ThreadsProcess, sizeof(EPROCESS)); + MmUpdatePageDir(Process, + (PVOID)Thread->StackLimit, + Thread->LargeStack ? KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); }
16 years, 4 months
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
86
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200