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
January 2007
----- 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
21 participants
401 discussions
Start a n
N
ew thread
[janderwald] 25636: - winsock2.h needs to be included before windows.h (msvc)
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jan 26 21:43:14 2007 New Revision: 25636 URL:
http://svn.reactos.org/svn/reactos?rev=25636&view=rev
Log: - winsock2.h needs to be included before windows.h (msvc) Modified: trunk/reactos/dll/win32/iphlpapi/iphlpapi_private.h Modified: trunk/reactos/dll/win32/iphlpapi/iphlpapi_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/iphlpap…
============================================================================== --- trunk/reactos/dll/win32/iphlpapi/iphlpapi_private.h (original) +++ trunk/reactos/dll/win32/iphlpapi/iphlpapi_private.h Fri Jan 26 21:43:14 2007 @@ -22,10 +22,10 @@ #undef _WIN32_WINNT #define _WIN32_WINNT 0x500 #define WIN32_NO_STATUS +#include <winsock2.h> #include <windows.h> #define NTOS_MODE_USER #include <ndk/ntndk.h> -#include <winsock2.h> #include <nspapi.h> #include <iptypes.h> #include "iphlpapi.h"
17 years, 11 months
1
0
0
0
[janderwald] 25635: - update ukrainian translation by Artem Reznikov temarez {AT} yandex (DOT) [RU] See issue #1723 for more details.
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jan 26 21:42:05 2007 New Revision: 25635 URL:
http://svn.reactos.org/svn/reactos?rev=25635&view=rev
Log: - update ukrainian translation by Artem Reznikov temarez {AT} yandex (DOT) [RU] See issue #1723 for more details. Modified: trunk/reactos/dll/win32/kernel32/nls/ukr.nls Modified: trunk/reactos/dll/win32/kernel32/nls/ukr.nls URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/nls/ukr…
============================================================================== --- trunk/reactos/dll/win32/kernel32/nls/ukr.nls (original) +++ trunk/reactos/dll/win32/kernel32/nls/ukr.nls Fri Jan 26 21:42:05 2007 @@ -134,21 +134,21 @@ LOCALE_STIMEFORMAT "H:mm:ss" LOCALE_SYEARMONTH "MMMM yyyy' ð.'" - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" - LGRPID_GREEK+LGRPID_RES_BASE "Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE "Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE "Thai" - LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE "Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Çàõ³äíà ªâðîïà ³ Ñïîëó÷åí³ Øòàòè" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Öåíòðàëüíà ªâðîïà" + LGRPID_BALTIC+LGRPID_RES_BASE "Áàëò³éñüêà" + LGRPID_GREEK+LGRPID_RES_BASE "Ãðåöüêà" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Êèðèëèöÿ" + LGRPID_TURKISH+LGRPID_RES_BASE "Òþðêñüê³ ìîâè" + LGRPID_JAPANESE+LGRPID_RES_BASE "ßïîíñüêà" + LGRPID_KOREAN+LGRPID_RES_BASE "Êîðåéñüêà" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Êèòàéñüêà òðàäèö³éíà" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Êèòàéñüêà ñïðîùåíà" + LGRPID_THAI+LGRPID_RES_BASE "Òàéñüêà" + LGRPID_HEBREW+LGRPID_RES_BASE "²âðèò" + LGRPID_ARABIC+LGRPID_RES_BASE "Àðàáñüêà" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Â'ºòíàìñüêà" + LGRPID_INDIC+LGRPID_RES_BASE "Õ³íä³" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Ãðóçèíñüêà" + LGRPID_ARMENIAN+LGRPID_RES_BASE "³ðìåíñüêà" }
17 years, 11 months
1
0
0
0
[fireball] 25634: Fix compile (debug information is removed from Spare[2], but noone uses it).
by fireball@svn.reactos.org
Author: fireball Date: Fri Jan 26 13:07:26 2007 New Revision: 25634 URL:
http://svn.reactos.org/svn/reactos?rev=25634&view=rev
Log: Fix compile (debug information is removed from Spare[2], but noone uses it). Modified: trunk/reactos/lib/rtl/heap.c Modified: trunk/reactos/lib/rtl/heap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heap.c?rev=25634&r…
============================================================================== --- trunk/reactos/lib/rtl/heap.c (original) +++ trunk/reactos/lib/rtl/heap.c Fri Jan 26 13:07:26 2007 @@ -204,7 +204,7 @@ { 0, 0, NULL, /* will be set later */ { &process_heap_critsect_debug.ProcessLocksList, &process_heap_critsect_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": main process heap section") } + 0, 0, 0, 0, 0 }; /***********************************************************************
17 years, 11 months
1
0
0
0
[ion] 25633: - Fix definition of RTL_CRITICAL_SECTION_DEBUG. - Fix all MSVC warnings in kernel32. - Re-enable PCH. - Disable Rtl*CondVar calls, since we can't target Vista *AND* 2003 due to linker problems. We'll need a way to create multiple DLL versions if we're going to attempt this. - Make ASSERTs always valid in kernel32 as long as DBG is set. - Fix Windows-loading hack, it seems there's only two levels of SEH. Eitherways, I think I've found a cleaner way to make it load nicely, so this hac
by ion@svn.reactos.org
Author: ion Date: Fri Jan 26 10:22:19 2007 New Revision: 25633 URL:
http://svn.reactos.org/svn/reactos?rev=25633&view=rev
Log: - Fix definition of RTL_CRITICAL_SECTION_DEBUG. - Fix all MSVC warnings in kernel32. - Re-enable PCH. - Disable Rtl*CondVar calls, since we can't target Vista *AND* 2003 due to linker problems. We'll need a way to create multiple DLL versions if we're going to attempt this. - Make ASSERTs always valid in kernel32 as long as DBG is set. - Fix Windows-loading hack, it seems there's only two levels of SEH. Eitherways, I think I've found a cleaner way to make it load nicely, so this hack will go away soon. Modified: trunk/reactos/dll/win32/kernel32/file/cnotify.c trunk/reactos/dll/win32/kernel32/file/dir.c trunk/reactos/dll/win32/kernel32/file/dosdev.c trunk/reactos/dll/win32/kernel32/file/file.c trunk/reactos/dll/win32/kernel32/file/find.c trunk/reactos/dll/win32/kernel32/file/lock.c trunk/reactos/dll/win32/kernel32/file/npipe.c trunk/reactos/dll/win32/kernel32/file/volume.c trunk/reactos/dll/win32/kernel32/include/debug.h trunk/reactos/dll/win32/kernel32/include/kernel32.h trunk/reactos/dll/win32/kernel32/k32.h trunk/reactos/dll/win32/kernel32/kernel32.rbuild trunk/reactos/dll/win32/kernel32/mem/global.c trunk/reactos/dll/win32/kernel32/mem/heap.c trunk/reactos/dll/win32/kernel32/misc/actctx.c trunk/reactos/dll/win32/kernel32/misc/comm.c trunk/reactos/dll/win32/kernel32/misc/computername.c trunk/reactos/dll/win32/kernel32/misc/console.c trunk/reactos/dll/win32/kernel32/misc/dllmain.c trunk/reactos/dll/win32/kernel32/misc/env.c trunk/reactos/dll/win32/kernel32/misc/errormsg.c trunk/reactos/dll/win32/kernel32/misc/lang.c trunk/reactos/dll/win32/kernel32/misc/lcformat.c trunk/reactos/dll/win32/kernel32/misc/ldr.c trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c trunk/reactos/dll/win32/kernel32/misc/nls.c trunk/reactos/dll/win32/kernel32/misc/profile.c trunk/reactos/dll/win32/kernel32/process/create.c trunk/reactos/dll/win32/kernel32/process/proc.c trunk/reactos/dll/win32/kernel32/string/lstring.c trunk/reactos/dll/win32/kernel32/synch/condvar.c trunk/reactos/dll/win32/kernel32/synch/timer.c trunk/reactos/dll/win32/kernel32/thread/thread.c trunk/reactos/include/psdk/winnt.h Modified: trunk/reactos/dll/win32/kernel32/file/cnotify.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/cn…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/cnotify.c (original) +++ trunk/reactos/dll/win32/kernel32/file/cnotify.c Fri Jan 26 10:22:19 2007 @@ -119,7 +119,7 @@ NULL,//Buffer, 0,//BufferLength, dwNotifyFilter, - bWatchSubtree); + (BOOLEAN)bWatchSubtree); if (!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); @@ -200,7 +200,7 @@ lpBuffer, nBufferLength, dwNotifyFilter, - bWatchSubtree + (BOOLEAN)bWatchSubtree ); if (!NT_SUCCESS(Status)) Modified: trunk/reactos/dll/win32/kernel32/file/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/di…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/dir.c (original) +++ trunk/reactos/dll/win32/kernel32/file/dir.c Fri Jan 26 10:22:19 2007 @@ -781,7 +781,7 @@ BOOLEAN spaces; memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR)); ustr_buf[tmplen] = '\0'; - ustr.Length = tmplen * sizeof(WCHAR); + ustr.Length = (USHORT)tmplen * sizeof(WCHAR); if (RtlIsNameLegalDOS8Dot3(&ustr, NULL, &spaces) && !spaces) { sp += tmplen; @@ -889,7 +889,7 @@ goto Cleanup; } - BufferU.MaximumLength = nBufferLength * sizeof(WCHAR); + BufferU.MaximumLength = (USHORT)nBufferLength * sizeof(WCHAR); BufferU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), 0, BufferU.MaximumLength); @@ -899,7 +899,7 @@ goto Cleanup; } - Buffer.MaximumLength = nBufferLength; + Buffer.MaximumLength = (USHORT)nBufferLength; Buffer.Buffer = lpBuffer; RetValue = SearchPathW (NULL == lpPath ? NULL : PathU.Buffer, Modified: trunk/reactos/dll/win32/kernel32/file/dosdev.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/do…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/dosdev.c (original) +++ trunk/reactos/dll/win32/kernel32/file/dosdev.c Fri Jan 26 10:22:19 2007 @@ -135,10 +135,10 @@ while (ucchMax) { CurrentLength = min (ucchMax, MAXUSHORT / 2); - TargetPathU.MaximumLength = TargetPathU.Length = CurrentLength * sizeof(WCHAR); + TargetPathU.MaximumLength = TargetPathU.Length = (USHORT)CurrentLength * sizeof(WCHAR); TargetPathA.Length = 0; - TargetPathA.MaximumLength = CurrentLength; + TargetPathA.MaximumLength = (USHORT)CurrentLength; RtlUnicodeStringToAnsiString (&TargetPathA, &TargetPathU, Modified: trunk/reactos/dll/win32/kernel32/file/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/file.c (original) +++ trunk/reactos/dll/win32/kernel32/file/file.c Fri Jan 26 10:22:19 2007 @@ -38,16 +38,16 @@ PUNICODE_STRING pstrW; NTSTATUS Status; - ASSERT(NtCurrentTeb()->StaticUnicodeString.Buffer == NtCurrentTeb()->StaticUnicodeBuffer); + //ASSERT(NtCurrentTeb()->StaticUnicodeString.Buffer == NtCurrentTeb()->StaticUnicodeBuffer); ASSERT(NtCurrentTeb()->StaticUnicodeString.MaximumLength == sizeof(NtCurrentTeb()->StaticUnicodeBuffer)); RtlInitAnsiString(&str, NameA); pstrW = alloc ? &strW : &NtCurrentTeb()->StaticUnicodeString; if (bIsFileApiAnsi) - Status= RtlAnsiStringToUnicodeString( pstrW, &str, alloc ); + Status= RtlAnsiStringToUnicodeString( pstrW, &str, (BOOLEAN)alloc ); else - Status= RtlOemStringToUnicodeString( pstrW, &str, alloc ); + Status= RtlOemStringToUnicodeString( pstrW, &str, (BOOLEAN)alloc ); if (NT_SUCCESS(Status)) return pstrW->Buffer; @@ -85,7 +85,7 @@ ANSI_STRING str; str.Buffer = DestA; - str.MaximumLength = destLen; + str.MaximumLength = (USHORT)destLen; if (bIsFileApiAnsi) @@ -337,7 +337,7 @@ 0, FileNameString.Buffer); - lpReOpenBuff->nErrCode = RtlNtStatusToDosError(errCode); + lpReOpenBuff->nErrCode = (WORD)RtlNtStatusToDosError(errCode); if (!NT_SUCCESS(errCode)) { @@ -1541,7 +1541,7 @@ if(lpOemName != NULL) { AnsiName.Buffer = lpOemName; - AnsiName.MaximumLength = OemNameSize * sizeof(CHAR); + AnsiName.MaximumLength = (USHORT)OemNameSize * sizeof(CHAR); AnsiName.Length = 0; } @@ -1583,7 +1583,7 @@ if(lpOemName != NULL) { AnsiName.Buffer = lpOemName; - AnsiName.MaximumLength = OemNameSize * sizeof(CHAR); + AnsiName.MaximumLength = (USHORT)OemNameSize * sizeof(CHAR); AnsiName.Length = 0; } @@ -1628,7 +1628,7 @@ cchFilePath > sizeof(FilePathW) / sizeof(FilePathW[0])) { FilePathU.Length = 0; - FilePathU.MaximumLength = cchFilePath * sizeof(WCHAR); + FilePathU.MaximumLength = (USHORT)cchFilePath * sizeof(WCHAR); FilePathU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, FilePathU.MaximumLength); Modified: trunk/reactos/dll/win32/kernel32/file/find.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/find.c (original) +++ trunk/reactos/dll/win32/kernel32/file/find.c Fri Jan 26 10:22:19 2007 @@ -95,7 +95,7 @@ lpFindFileData->nFileSizeHigh = lpFileInfo->EndOfFile.u.HighPart; lpFindFileData->nFileSizeLow = lpFileInfo->EndOfFile.u.LowPart; - FileNameU.Length = FileNameU.MaximumLength = lpFileInfo->FileNameLength; + FileNameU.Length = FileNameU.MaximumLength = (USHORT)lpFileInfo->FileNameLength; FileNameU.Buffer = lpFileInfo->FileName; FileNameA.MaximumLength = sizeof(lpFindFileData->cFileName) - sizeof(CHAR); @@ -213,7 +213,7 @@ PWSTR SearchPath; PWCHAR SearchPattern; ULONG Length; - BOOLEAN bResult; + BOOL bResult; DPRINT("FindFirstFileW(lpFileName %S)\n", lpFileName); @@ -698,7 +698,7 @@ InternalCopyStreamInfo(IN OUT PKERNEL32_FIND_STREAM_DATA IData, OUT LPVOID lpFindStreamData) { - ASSERT(IData->pCurrent != NULL); + ASSERT(IData->pCurrent); switch (IData->InfoLevel) { Modified: trunk/reactos/dll/win32/kernel32/file/lock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/lo…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/lock.c (original) +++ trunk/reactos/dll/win32/kernel32/file/lock.c Fri Jan 26 10:22:19 2007 @@ -98,8 +98,8 @@ &Offset, &BytesToLock, 0, - LockImmediate, - LockExclusive); + (BOOLEAN)LockImmediate, + (BOOLEAN)LockExclusive); if ( !NT_SUCCESS(errCode) ) { SetLastErrorByStatus (errCode); Modified: trunk/reactos/dll/win32/kernel32/file/npipe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/np…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/npipe.c (original) +++ trunk/reactos/dll/win32/kernel32/file/npipe.c Fri Jan 26 10:22:19 2007 @@ -919,7 +919,7 @@ if(lpUserName != NULL) { - UserNameW.MaximumLength = nMaxUserNameSize * sizeof(WCHAR); + UserNameW.MaximumLength = (USHORT)nMaxUserNameSize * sizeof(WCHAR); UserNameW.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, UserNameW.MaximumLength); if (UserNameW.Buffer == NULL) { @@ -929,7 +929,7 @@ UserNameA.Buffer = lpUserName; UserNameA.Length = 0; - UserNameA.MaximumLength = nMaxUserNameSize; + UserNameA.MaximumLength = (USHORT)nMaxUserNameSize; } Ret = GetNamedPipeHandleStateW(hNamedPipe, Modified: trunk/reactos/dll/win32/kernel32/file/volume.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/vo…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/volume.c (original) +++ trunk/reactos/dll/win32/kernel32/file/volume.c Fri Jan 26 10:22:19 2007 @@ -106,7 +106,7 @@ for (drive = 0; drive < MAX_DOS_DRIVES; drive++) if (dwDriveMap & (1<<drive)) { - *p++ = 'A' + drive; + *p++ = 'A' + (UCHAR)drive; *p++ = ':'; *p++ = '\\'; *p++ = '\0'; @@ -464,7 +464,7 @@ if (lpVolumeNameBuffer) { - VolumeNameU.MaximumLength = nVolumeNameSize * sizeof(WCHAR); + VolumeNameU.MaximumLength = (USHORT)nVolumeNameSize * sizeof(WCHAR); VolumeNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), 0, VolumeNameU.MaximumLength); @@ -477,7 +477,7 @@ if (lpFileSystemNameBuffer) { FileSystemNameU.Length = 0; - FileSystemNameU.MaximumLength = nFileSystemNameSize * sizeof(WCHAR); + FileSystemNameU.MaximumLength = (USHORT)nFileSystemNameSize * sizeof(WCHAR); FileSystemNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), 0, FileSystemNameU.MaximumLength); @@ -511,7 +511,7 @@ { VolumeNameU.Length = wcslen(VolumeNameU.Buffer) * sizeof(WCHAR); VolumeName.Length = 0; - VolumeName.MaximumLength = nVolumeNameSize; + VolumeName.MaximumLength = (USHORT)nVolumeNameSize; VolumeName.Buffer = lpVolumeNameBuffer; } @@ -519,7 +519,7 @@ { FileSystemNameU.Length = wcslen(FileSystemNameU.Buffer) * sizeof(WCHAR); FileSystemName.Length = 0; - FileSystemName.MaximumLength = nFileSystemNameSize; + FileSystemName.MaximumLength = (USHORT)nFileSystemNameSize; FileSystemName.Buffer = lpFileSystemNameBuffer; } Modified: trunk/reactos/dll/win32/kernel32/include/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/include…
============================================================================== --- trunk/reactos/dll/win32/kernel32/include/debug.h (original) +++ trunk/reactos/dll/win32/kernel32/include/debug.h Fri Jan 26 10:22:19 2007 @@ -10,19 +10,15 @@ #define DPRINT #endif #define CHECKPOINT -#ifdef ASSERT -#undef ASSERT -#endif -#define ASSERT(x) #else #define DPRINT(...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0); #define CHECKPOINT do { DbgPrint("(KERNEL32:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0); +#endif + #ifdef ASSERT #undef ASSERT -#endif #define ASSERT(x) do { if(!x) RtlAssert("#x", __FILE__,__LINE__, ""); } while(0); #endif - #define DPRINT1(...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0); #define CHECKPOINT1 do { DbgPrint("(KERNEL32:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0); Modified: trunk/reactos/dll/win32/kernel32/include/kernel32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/include…
============================================================================== --- trunk/reactos/dll/win32/kernel32/include/kernel32.h (original) +++ trunk/reactos/dll/win32/kernel32/include/kernel32.h Fri Jan 26 10:22:19 2007 @@ -105,11 +105,11 @@ VOID STDCALL -BaseThreadStartupThunk(); +BaseThreadStartupThunk(VOID); VOID STDCALL -BaseProcessStartThunk(); +BaseProcessStartThunk(VOID); __declspec(noreturn) VOID Modified: trunk/reactos/dll/win32/kernel32/k32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/k32.h?r…
============================================================================== --- trunk/reactos/dll/win32/kernel32/k32.h (original) +++ trunk/reactos/dll/win32/kernel32/k32.h Fri Jan 26 10:22:19 2007 @@ -12,8 +12,8 @@ /* INCLUDES ******************************************************************/ /* PSDK/NDK Headers */ +#define DBG 1 #define WIN32_NO_STATUS -#define NTOS_MODE_USER #define _KERNEL32_ #include <windows.h> #include <tlhelp32.h> @@ -29,7 +29,6 @@ /* DDK Driver Headers */ #include <ntddbeep.h> -#include <ntddser.h> #include <mountmgr.h> #include <mountdev.h> Modified: trunk/reactos/dll/win32/kernel32/kernel32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
============================================================================== --- trunk/reactos/dll/win32/kernel32/kernel32.rbuild (original) +++ trunk/reactos/dll/win32/kernel32/kernel32.rbuild Fri Jan 26 10:22:19 2007 @@ -5,15 +5,10 @@ <define name="_DISABLE_TIDENTS" /> <define name="_SEH_NO_NATIVE_NLG" /> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0502</define> + <define name="_WIN32_WINNT">0x0600</define> <define name="__NO_CTYPE_INLINES" /> - <define name="WINVER">0x502</define> -<!-- - !!! DO NOT ENABLE PCH! SOME FILES ARE NOT PCH-SAFE AS THEY DEFINE !!! - !!! _WIN32_WINNT DIFFERENTLY BEFORE INCLUDING k32.h !!! - + <define name="WINVER">0x609</define> <pch>k32.h</pch> ---> <directory name="debug"> <file>debugger.c</file> <file>output.c</file> Modified: trunk/reactos/dll/win32/kernel32/mem/global.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/mem/glo…
============================================================================== --- trunk/reactos/dll/win32/kernel32/mem/global.c (original) +++ trunk/reactos/dll/win32/kernel32/mem/global.c Fri Jan 26 10:22:19 2007 @@ -914,12 +914,12 @@ /* Reset the right size and fill out the information */ lpBuffer->dwLength = sizeof(MEMORYSTATUS); lpBuffer->dwMemoryLoad = lpBufferEx.dwMemoryLoad; - lpBuffer->dwTotalPhys = lpBufferEx.ullTotalPhys; - lpBuffer->dwAvailPhys = lpBufferEx.ullAvailPhys; - lpBuffer->dwTotalPageFile = lpBufferEx.ullTotalPageFile; - lpBuffer->dwAvailPageFile = lpBufferEx.ullAvailPageFile; - lpBuffer->dwTotalVirtual = lpBufferEx.ullTotalVirtual; - lpBuffer->dwAvailVirtual = lpBufferEx.ullAvailVirtual; + lpBuffer->dwTotalPhys = (SIZE_T)lpBufferEx.ullTotalPhys; + lpBuffer->dwAvailPhys = (SIZE_T)lpBufferEx.ullAvailPhys; + lpBuffer->dwTotalPageFile = (SIZE_T)lpBufferEx.ullTotalPageFile; + lpBuffer->dwAvailPageFile = (SIZE_T)lpBufferEx.ullAvailPageFile; + lpBuffer->dwTotalVirtual = (SIZE_T)lpBufferEx.ullTotalVirtual; + lpBuffer->dwAvailVirtual = (SIZE_T)lpBufferEx.ullAvailVirtual; } } Modified: trunk/reactos/dll/win32/kernel32/mem/heap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/mem/hea…
============================================================================== --- trunk/reactos/dll/win32/kernel32/mem/heap.c (original) +++ trunk/reactos/dll/win32/kernel32/mem/heap.c Fri Jan 26 10:22:19 2007 @@ -157,8 +157,8 @@ { NTSTATUS Status; - /* Call the RTL API */ - Status = RtlExtendHeap(hHeap, dwFlags, BaseAddress, dwBytes); + /* Call the RTL API. Gone in Vista, so commented out. */ + Status = STATUS_NOT_IMPLEMENTED; //RtlExtendHeap(hHeap, dwFlags, BaseAddress, dwBytes); if (!NT_SUCCESS(Status)) { /* We failed */ @@ -185,7 +185,7 @@ return RtlQueryTagHeap(hHeap, dwFlags, wTagIndex, - bResetCounters, + (BOOLEAN)bResetCounters, lpTagInfo); } @@ -204,8 +204,8 @@ /* Fill in the length information */ Usage.Length = sizeof(Usage); - /* Call RTL */ - Status = RtlUsageHeap(hHeap, dwFlags, &Usage); + /* Call RTL. Gone in Vista, so commented out */ + Status = STATUS_NOT_IMPLEMENTED; //RtlUsageHeap(hHeap, dwFlags, &Usage); if (!NT_SUCCESS(Status)) { /* We failed */ @@ -231,8 +231,8 @@ { NTSTATUS Status; - /* Call RTL */ - Status = RtlUsageHeap(hHeap, dwFlags, Usage); + /* Call RTL. Gone in Vista, so commented out */ + Status = STATUS_NOT_IMPLEMENTED; //RtlUsageHeap(hHeap, dwFlags, &Usage); if (!NT_SUCCESS(Status)) { /* We failed */ Modified: trunk/reactos/dll/win32/kernel32/misc/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ac…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/actctx.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/actctx.c Fri Jan 26 10:22:19 2007 @@ -40,10 +40,10 @@ } /* Call the Unicode function */ - bRetVal = FindActCtxSectionStringA(dwFlags, + bRetVal = FindActCtxSectionStringW(dwFlags, lpExtensionGuid, ulSectionId, - lpStringToFind, + lpStringToFindW, ReturnedData); /* Clean up */ Modified: trunk/reactos/dll/win32/kernel32/misc/comm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/comm.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/comm.c Fri Jan 26 10:22:19 2007 @@ -21,6 +21,24 @@ */ #include <k32.h> +#undef SERIAL_LSRMST_ESCAPE +#undef SERIAL_LSRMST_LSR_DATA +#undef SERIAL_LSRMST_LSR_NODATA +#undef SERIAL_LSRMST_MST +#undef SERIAL_IOC_FCR_FIFO_ENABLE +#undef SERIAL_IOC_FCR_RCVR_RESET +#undef SERIAL_IOC_FCR_XMIT_RESET +#undef SERIAL_IOC_FCR_DMA_MODE +#undef SERIAL_IOC_FCR_RES1 +#undef SERIAL_IOC_FCR_RES2 +#undef SERIAL_IOC_FCR_RCVR_TRIGGER_LSB +#undef SERIAL_IOC_FCR_RCVR_TRIGGER_MSB +#undef SERIAL_IOC_MCR_DTR +#undef SERIAL_IOC_MCR_RTS +#undef SERIAL_IOC_MCR_OUT1 +#undef SERIAL_IOC_MCR_OUT2 +#undef SERIAL_IOC_MCR_LOOP +#include <ntddser.h> #define NDEBUG #include "../include/debug.h" @@ -331,7 +349,7 @@ return FALSE; /* success */ - Dcb->ByteSize = nValue; + Dcb->ByteSize = (BYTE)nValue; return TRUE; } @@ -442,7 +460,7 @@ return FALSE; /* success */ - Dcb->Parity = nValue; + Dcb->Parity = (BYTE)nValue; return TRUE; } @@ -503,7 +521,7 @@ *StopBitsSet = TRUE; /* success */ - Dcb->StopBits = nValue; + Dcb->StopBits = (BYTE)nValue; return TRUE; } @@ -1112,8 +1130,8 @@ if (HandFlow.FlowReplace & SERIAL_XOFF_CONTINUE) { lpDCB->fTXContinueOnXoff = 1; } - lpDCB->XonLim = HandFlow.XonLimit; - lpDCB->XoffLim = HandFlow.XoffLimit; + lpDCB->XonLim = (WORD)HandFlow.XonLimit; + lpDCB->XoffLim = (WORD)HandFlow.XoffLimit; result = DeviceIoControl(hFile, IOCTL_SERIAL_GET_CHARS, NULL, 0, &SpecialChars, sizeof(SpecialChars), &dwBytesReturned, NULL); Modified: trunk/reactos/dll/win32/kernel32/misc/computername.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/computername.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/computername.c Fri Jan 26 10:22:19 2007 @@ -144,7 +144,7 @@ case ComputerNameDnsFullyQualified: ResultString.Length = 0; - ResultString.MaximumLength = *nSize * sizeof(WCHAR); + ResultString.MaximumLength = (USHORT)*nSize * sizeof(WCHAR); ResultString.Buffer = lpBuffer; RtlZeroMemory(QueryTable, sizeof(QueryTable)); @@ -238,15 +238,15 @@ return ERROR_OUTOFMEMORY; } - AnsiString.MaximumLength = *nSize; + AnsiString.MaximumLength = (USHORT)*nSize; AnsiString.Length = 0; AnsiString.Buffer = lpBuffer; Result = GetComputerNameExW( NameType, TempBuffer, nSize ); if( Result ) { - UnicodeString.MaximumLength = *nSize * sizeof(WCHAR); - UnicodeString.Length = *nSize * sizeof(WCHAR); + UnicodeString.MaximumLength = (USHORT)*nSize * sizeof(WCHAR); + UnicodeString.Length = (USHORT)*nSize * sizeof(WCHAR); UnicodeString.Buffer = TempBuffer; RtlUnicodeStringToAnsiString (&AnsiString, Modified: trunk/reactos/dll/win32/kernel32/misc/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/console.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/console.c Fri Jan 26 10:22:19 2007 @@ -483,7 +483,7 @@ /* * @unimplemented */ -DWORD STDCALL +INT STDCALL GetConsoleDisplayMode (LPDWORD lpdwMode) /* * FUNCTION: Get the console display mode @@ -592,7 +592,7 @@ /* * @unimplemented */ -DWORD STDCALL +INT STDCALL GetCurrentConsoleFont(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFO lpConsoleCurrentFont) @@ -1126,7 +1126,7 @@ Request->Data.WriteConsoleRequest.ConsoleHandle = hConsoleOutput; Request->Data.WriteConsoleRequest.Unicode = bUnicode; - nChars = min(nNumberOfCharsToWrite, CSRSS_MAX_WRITE_CONSOLE / CharSize); + nChars = (USHORT)min(nNumberOfCharsToWrite, CSRSS_MAX_WRITE_CONSOLE / CharSize); Request->Data.WriteConsoleRequest.NrCharactersToWrite = nChars; SizeBytes = nChars * CharSize; @@ -1245,8 +1245,8 @@ Request->Data.ReadConsoleRequest.ConsoleHandle = hConsoleInput; Request->Data.ReadConsoleRequest.Unicode = bUnicode; - Request->Data.ReadConsoleRequest.NrCharactersToRead = min(nNumberOfCharsToRead, CSRSS_MAX_READ_CONSOLE / CharSize); - Request->Data.ReadConsoleRequest.nCharsCanBeDeleted = CharsRead; + Request->Data.ReadConsoleRequest.NrCharactersToRead = (WORD)min(nNumberOfCharsToRead, CSRSS_MAX_READ_CONSOLE / CharSize); + Request->Data.ReadConsoleRequest.nCharsCanBeDeleted = (WORD)CharsRead; Status = CsrClientCallServer(Request, NULL, CsrRequest, @@ -1477,7 +1477,7 @@ else Request.Data.FillOutputRequest.Char.AsciiChar = *((CHAR*)cCharacter); Request.Data.FillOutputRequest.Position = dwWriteCoord; - Request.Data.FillOutputRequest.Length = nLength; + Request.Data.FillOutputRequest.Length = (WORD)nLength; Status = CsrClientCallServer(&Request, NULL, CsrRequest, sizeof(CSR_API_MESSAGE)); @@ -2316,7 +2316,7 @@ Request->Data.WriteConsoleOutputCharRequest.ConsoleHandle = hConsoleOutput; Request->Data.WriteConsoleOutputCharRequest.Unicode = bUnicode; - Request->Data.WriteConsoleOutputCharRequest.Length = min(nLength, nChars); + Request->Data.WriteConsoleOutputCharRequest.Length = (WORD)min(nLength, nChars); BytesWrite = Request->Data.WriteConsoleOutputCharRequest.Length * CharSize; memcpy(Request->Data.WriteConsoleOutputCharRequest.String, lpCharacter, BytesWrite); @@ -2430,7 +2430,7 @@ *lpNumberOfAttrsWritten = nLength; while( nLength ) { - Size = min(nLength, CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB / sizeof(WORD)); + Size = (WORD)min(nLength, CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB / sizeof(WORD)); Request->Data.WriteConsoleOutputAttribRequest.ConsoleHandle = hConsoleOutput; Request->Data.WriteConsoleOutputAttribRequest.Length = Size; memcpy(Request->Data.WriteConsoleOutputAttribRequest.Attribute, lpAttribute, Size * sizeof(WORD)); @@ -2479,9 +2479,9 @@ CsrRequest = MAKE_CSR_API(FILL_OUTPUT_ATTRIB, CSR_CONSOLE); Request.Data.FillOutputAttribRequest.ConsoleHandle = hConsoleOutput; - Request.Data.FillOutputAttribRequest.Attribute = wAttribute; + Request.Data.FillOutputAttribRequest.Attribute = (CHAR)wAttribute; Request.Data.FillOutputAttribRequest.Coord = dwWriteCoord; - Request.Data.FillOutputAttribRequest.Length = nLength; + Request.Data.FillOutputAttribRequest.Length = (WORD)nLength; Status = CsrClientCallServer( &Request, NULL, CsrRequest, sizeof( CSR_API_MESSAGE ) ); if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Request.Status ) ) { @@ -2891,7 +2891,7 @@ CsrRequest = MAKE_CSR_API(SET_ATTRIB, CSR_CONSOLE); Request.Data.SetAttribRequest.ConsoleHandle = hConsoleOutput; - Request.Data.SetAttribRequest.Attrib = wAttributes; + Request.Data.SetAttribRequest.Attrib = (CHAR)wAttributes; Status = CsrClientCallServer( &Request, NULL, CsrRequest, sizeof( CSR_API_MESSAGE ) ); if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Request.Status ) ) { @@ -2975,7 +2975,7 @@ SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, BOOL Add) { - BOOLEAN Ret; + BOOL Ret; RtlEnterCriticalSection(&DllLock); if (Add) @@ -3652,7 +3652,7 @@ RtlInitUnicodeString(&BufferU, Buffer); BufferA.Length = 0; - BufferA.MaximumLength = nBufferLength; + BufferA.MaximumLength = (USHORT)nBufferLength; BufferA.Buffer = lpBuffer; RtlUnicodeStringToAnsiString(&BufferA, &BufferU, FALSE); Modified: trunk/reactos/dll/win32/kernel32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/dl…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/dllmain.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/dllmain.c Fri Jan 26 10:22:19 2007 @@ -323,7 +323,7 @@ if (hDll == (HANDLE)0x7c800000) { PULONG Eip; - Eip = (PULONG)*(PULONG)*(PULONG)NtCurrentTeb()->Tib.ExceptionList + + Eip = (PULONG)*(PULONG)NtCurrentTeb()->Tib.ExceptionList + 0x9 + FIELD_OFFSET(CONTEXT, Eip) / sizeof(ULONG); *Eip = (ULONG)BaseProcessStartThunk; Modified: trunk/reactos/dll/win32/kernel32/misc/env.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/en…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/env.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/env.c Fri Jan 26 10:22:19 2007 @@ -43,14 +43,14 @@ /* initialize ansi variable value string */ VarValue.Length = 0; - VarValue.MaximumLength = nSize; + VarValue.MaximumLength = (USHORT)nSize; VarValue.Buffer = lpBuffer; /* initialize unicode variable value string and allocate buffer */ VarValueU.Length = 0; if (nSize != 0) { - VarValueU.MaximumLength = (nSize - 1) * sizeof(WCHAR); + VarValueU.MaximumLength = (USHORT)(nSize - 1) * sizeof(WCHAR); VarValueU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), 0, nSize * sizeof(WCHAR)); @@ -139,7 +139,7 @@ lpName); VarValue.Length = 0; - VarValue.MaximumLength = (nSize != 0 ? (nSize - 1) * sizeof(WCHAR) : 0); + VarValue.MaximumLength = (USHORT)(nSize != 0 ? (nSize - 1) * sizeof(WCHAR) : 0); VarValue.Buffer = lpBuffer; Status = RtlQueryEnvironmentVariable_U (NULL, @@ -298,10 +298,10 @@ DPRINT("EnvPtr %p\n", EnvPtr); /* convert unicode environment to ansi */ - UnicodeString.MaximumLength = Length * sizeof(WCHAR) + sizeof(WCHAR); + UnicodeString.MaximumLength = (USHORT)Length * sizeof(WCHAR) + sizeof(WCHAR); UnicodeString.Buffer = EnvU; - AnsiString.MaximumLength = Length + 1; + AnsiString.MaximumLength = (USHORT)Length + 1; AnsiString.Length = 0; AnsiString.Buffer = EnvPtr; @@ -314,7 +314,7 @@ if (UnicodeString.Length > 0) { AnsiString.Length = 0; - AnsiString.MaximumLength = Length + 1 - (AnsiString.Buffer - EnvPtr); + AnsiString.MaximumLength = (USHORT)Length + 1 - (AnsiString.Buffer - EnvPtr); RtlUnicodeStringToAnsiString (&AnsiString, &UnicodeString, @@ -407,11 +407,11 @@ } Destination.Length = 0; - Destination.MaximumLength = nSize; + Destination.MaximumLength = (USHORT)nSize; Destination.Buffer = lpDst; DestinationU.Length = 0; - DestinationU.MaximumLength = nSize * sizeof(WCHAR); + DestinationU.MaximumLength = (USHORT)nSize * sizeof(WCHAR); DestinationU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), 0, DestinationU.MaximumLength); @@ -473,7 +473,7 @@ (LPWSTR)lpSrc); Destination.Length = 0; - Destination.MaximumLength = nSize * sizeof(WCHAR); + Destination.MaximumLength = (USHORT)nSize * sizeof(WCHAR); Destination.Buffer = lpDst; Status = RtlExpandEnvironmentStrings_U (NULL, Modified: trunk/reactos/dll/win32/kernel32/misc/errormsg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/er…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/errormsg.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/errormsg.c Fri Jan 26 10:22:19 2007 @@ -104,7 +104,7 @@ if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len ))) return NULL; memcpy( buffer, mre->Text, len ); } - TRACE("returning %s\n", wine_dbgstr_a(buffer)); + //TRACE("returning %s\n", wine_dbgstr_a(buffer)); return buffer; } @@ -135,7 +135,7 @@ if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return NULL; MultiByteToWideChar( CP_ACP, 0, (const char*)mre->Text, -1, buffer, len ); } - TRACE("returning %s\n", wine_dbgstr_w(buffer)); + //TRACE("returning %s\n", wine_dbgstr_w(buffer)); return buffer; } @@ -187,9 +187,9 @@ else { from = NULL; if (dwFlags & FORMAT_MESSAGE_FROM_HMODULE) - from = load_messageA( (HMODULE)lpSource, dwMessageId, dwLanguageId ); + from = load_messageA( (HMODULE)lpSource, dwMessageId, (WORD)dwLanguageId ); if (!from && (dwFlags & FORMAT_MESSAGE_FROM_SYSTEM)) - from = load_messageA( kernel32_handle, dwMessageId, dwLanguageId ); + from = load_messageA( kernel32_handle, dwMessageId, (WORD)dwLanguageId ); if (!from) { @@ -373,7 +373,7 @@ if (nSize && talloced<nSize) { target = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,target,nSize); } - TRACE("-- %s\n",debugstr_a(target)); + //TRACE("-- %s\n",debugstr_a(target)); if (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) { *((LPVOID*)lpBuffer) = (LPVOID)LocalAlloc(LMEM_ZEROINIT,max(nSize, talloced)); memcpy(*(LPSTR*)lpBuffer,target,talloced); @@ -439,9 +439,9 @@ else { from = NULL; if (dwFlags & FORMAT_MESSAGE_FROM_HMODULE) - from = load_messageW( (HMODULE)lpSource, dwMessageId, dwLanguageId ); + from = load_messageW( (HMODULE)lpSource, dwMessageId, (WORD)dwLanguageId ); if (!from && (dwFlags & FORMAT_MESSAGE_FROM_SYSTEM)) - from = load_messageW( kernel32_handle, dwMessageId, dwLanguageId ); + from = load_messageW( kernel32_handle, dwMessageId,(WORD)dwLanguageId ); if (!from) { @@ -636,8 +636,8 @@ HeapFree(GetProcessHeap(),0,target); HeapFree(GetProcessHeap(),0,from); - TRACE("ret=%s\n", wine_dbgstr_w((dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ? - *(LPWSTR*)lpBuffer : lpBuffer)); + //TRACE("ret=%s\n", wine_dbgstr_w((dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ? + // *(LPWSTR*)lpBuffer : lpBuffer)); return (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ? strlenW(*(LPWSTR*)lpBuffer): strlenW(lpBuffer); Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/la…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/lang.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/lang.c Fri Jan 26 10:22:19 2007 @@ -23,8 +23,6 @@ /* FIXME: these are included in winnls.h, however including this file causes alot of conflicting type errors. */ -#define LOCALE_SYEARMONTH 0x1006 -#define LOCALE_IPAPERSIZE 0x100A #define LOCALE_RETURN_NUMBER 0x20000000 #define LOCALE_USE_CP_ACP 0x40000000 #define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|LOCALE_RETURN_NUMBER) @@ -994,7 +992,7 @@ } else Result = RtlCompareUnicodeString( - &String1, &String2, dwCmpFlags & NORM_IGNORECASE); + &String1, &String2, (BOOLEAN)(dwCmpFlags & NORM_IGNORECASE)); if (Result) /* need to translate result */ Modified: trunk/reactos/dll/win32/kernel32/misc/lcformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/lc…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/lcformat.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/lcformat.c Fri Jan 26 10:22:19 2007 @@ -85,7 +85,7 @@ 0, 0, &NLS_FormatsCS, { &NLS_FormatsCS_debug.ProcessLocksList, &NLS_FormatsCS_debug.ProcessLocksList }, - 0, 0, { 0, (DWORD)(__FILE__ ": NLS_Formats") } + 0, 0, 0, 0 }; static RTL_CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0 }; Modified: trunk/reactos/dll/win32/kernel32/misc/ldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ld…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/ldr.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/ldr.c Fri Jan 26 10:22:19 2007 @@ -315,7 +315,7 @@ else { FileName.Length = 0; - FileName.MaximumLength = nSize * sizeof(WCHAR); + FileName.MaximumLength = (USHORT)nSize * sizeof(WCHAR); FileName.Buffer = lpFilename; /* convert unicode string to ansi (or oem) */ @@ -383,7 +383,7 @@ else { FileName.Length = 0; - FileName.MaximumLength = nSize * sizeof(WCHAR); + FileName.MaximumLength =(USHORT)nSize * sizeof(WCHAR); FileName.Buffer = lpFilename; RtlCopyUnicodeString (&FileName, @@ -680,7 +680,8 @@ HeapFree(GetProcessHeap(), 0, CommandLine); /* Wait up to 15 seconds for the process to become idle */ - WaitForInputIdle(ProcessInformation.hProcess, 15000); + /* FIXME: This is user32! Windows soft-loads this only if required. */ + //WaitForInputIdle(ProcessInformation.hProcess, 15000); CloseHandle(ProcessInformation.hThread); CloseHandle(ProcessInformation.hProcess); Modified: trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/lz…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c Fri Jan 26 10:22:19 2007 @@ -266,9 +266,9 @@ } if (isalpha(head.lastchar)) { if (fnislowercased) - head.lastchar=tolower(head.lastchar); + head.lastchar=(CHAR)tolower(head.lastchar); else - head.lastchar=toupper(head.lastchar); + head.lastchar=(CHAR)toupper(head.lastchar); } /* now look where to replace the last character */ Modified: trunk/reactos/dll/win32/kernel32/misc/nls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/nl…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/nls.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/nls.c Fri Jan 26 10:22:19 2007 @@ -489,7 +489,7 @@ break; } TempLength--; - *MultiByteString++ = Char; + *MultiByteString++ = (CHAR)Char; continue; } Modified: trunk/reactos/dll/win32/kernel32/misc/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/pr…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/profile.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/profile.c Fri Jan 26 10:22:19 2007 @@ -76,7 +76,7 @@ { 0, 0, &PROFILE_CritSect, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { 0, (DWORD)(__FILE__ ": PROFILE_CritSect") } + 0, 0, 0, 0 }; static RTL_CRITICAL_SECTION PROFILE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 }; @@ -121,7 +121,7 @@ } lstrcpynW( buffer, value, len ); - if (quote && (len >= wcslen(value))) buffer[wcslen(buffer)-1] = '\0'; + if (quote && (len >= (int)wcslen(value))) buffer[wcslen(buffer)-1] = '\0'; } Modified: trunk/reactos/dll/win32/kernel32/process/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/process…
============================================================================== --- trunk/reactos/dll/win32/kernel32/process/create.c (original) +++ trunk/reactos/dll/win32/kernel32/process/create.c Fri Jan 26 10:22:19 2007 @@ -199,7 +199,7 @@ else { - AnsiEnv.Length = (ULONG_PTR)pcScan - (ULONG_PTR)lpEnvironment + sizeof(CHAR); + AnsiEnv.Length = (USHORT)((ULONG_PTR)pcScan - (ULONG_PTR)lpEnvironment + sizeof(CHAR)); } AnsiEnv.MaximumLength = AnsiEnv.Length + 1; @@ -221,7 +221,7 @@ } /* Use the allocated size */ - UnicodeEnv.MaximumLength = *EnvSize; + UnicodeEnv.MaximumLength = (USHORT)*EnvSize; /* Convert */ RtlAnsiStringToUnicodeString(&UnicodeEnv, &AnsiEnv, FALSE); @@ -754,7 +754,7 @@ /* Easy stuff first, convert the process priority class */ PriorityClass.Foreground = FALSE; - PriorityClass.PriorityClass = BasepConvertPriorityClass(dwCreationFlags); + PriorityClass.PriorityClass = (UCHAR)BasepConvertPriorityClass(dwCreationFlags); if (lpCommandLine) { @@ -1158,7 +1158,7 @@ PROCESS_ALL_ACCESS, ObjectAttributes, NtCurrentProcess(), - bInheritHandles, + (BOOLEAN)bInheritHandles, hSection, hDebug, NULL); Modified: trunk/reactos/dll/win32/kernel32/process/proc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/process…
============================================================================== --- trunk/reactos/dll/win32/kernel32/process/proc.c (original) +++ trunk/reactos/dll/win32/kernel32/process/proc.c Fri Jan 26 10:22:19 2007 @@ -376,7 +376,7 @@ RtlZeroMemory(&StartupInfo, sizeof(StartupInfo)); StartupInfo.cb = sizeof(STARTUPINFOA); - StartupInfo.wShowWindow = uCmdShow; + StartupInfo.wShowWindow = (WORD)uCmdShow; StartupInfo.dwFlags = 0; if (! CreateProcessA(NULL, @@ -419,20 +419,6 @@ return; } - -/* - * @unimplemented - */ -DWORD STDCALL -WaitForInputIdle ( - HANDLE hProcess, - DWORD dwMilliseconds - ) -{ - return 0; -} - - /* * @implemented */ @@ -460,7 +446,7 @@ lpStartupInfo->dwYCountChars = Params->CountCharsY; lpStartupInfo->dwFillAttribute = Params->FillAttribute; lpStartupInfo->dwFlags = Params->WindowFlags; - lpStartupInfo->wShowWindow = Params->ShowWindowFlags; + lpStartupInfo->wShowWindow = (WORD)Params->ShowWindowFlags; lpStartupInfo->cbReserved2 = Params->RuntimeData.Length; lpStartupInfo->lpReserved2 = (LPBYTE)Params->RuntimeData.Buffer; @@ -531,7 +517,7 @@ lpLocalStartupInfo->dwYCountChars = Params->CountCharsY; lpLocalStartupInfo->dwFillAttribute = Params->FillAttribute; lpLocalStartupInfo->dwFlags = Params->WindowFlags; - lpLocalStartupInfo->wShowWindow = Params->ShowWindowFlags; + lpLocalStartupInfo->wShowWindow = (WORD)Params->ShowWindowFlags; lpLocalStartupInfo->cbReserved2 = Params->RuntimeData.Length; lpLocalStartupInfo->lpReserved2 = (LPBYTE)Params->RuntimeData.Buffer; Modified: trunk/reactos/dll/win32/kernel32/string/lstring.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/string/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/string/lstring.c (original) +++ trunk/reactos/dll/win32/kernel32/string/lstring.c Fri Jan 26 10:22:19 2007 @@ -10,7 +10,6 @@ #include <k32.h> - static _SEH_FILTER(lstr_page_fault) { if (_SEH_GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION) @@ -72,7 +71,6 @@ return Result; } - /* * @implemented */ Modified: trunk/reactos/dll/win32/kernel32/synch/condvar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/synch/c…
============================================================================== --- trunk/reactos/dll/win32/kernel32/synch/condvar.c (original) +++ trunk/reactos/dll/win32/kernel32/synch/condvar.c Fri Jan 26 10:22:19 2007 @@ -38,7 +38,7 @@ IN OUT PCRITICAL_SECTION CriticalSection, IN DWORD dwMilliseconds) { - NTSTATUS Status; + NTSTATUS Status = 0; LARGE_INTEGER TimeOut; PLARGE_INTEGER TimeOutPtr = NULL; @@ -48,10 +48,11 @@ TimeOutPtr = &TimeOut; } +#if 0 Status = RtlSleepConditionVariableCS((PRTL_CONDITION_VARIABLE)ConditionVariable, (PRTL_CRITICAL_SECTION)CriticalSection, TimeOutPtr); - +#endif if (!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); @@ -72,7 +73,7 @@ IN DWORD dwMilliseconds, IN ULONG Flags) { - NTSTATUS Status; + NTSTATUS Status = 0; LARGE_INTEGER TimeOut; PLARGE_INTEGER TimeOutPtr = NULL; @@ -82,11 +83,12 @@ TimeOutPtr = &TimeOut; } +#if 0 Status = RtlSleepConditionVariableSRW((PRTL_CONDITION_VARIABLE)ConditionVariable, (PRTL_SRWLOCK)SRWLock, TimeOutPtr, Flags); - +#endif if (!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); Modified: trunk/reactos/dll/win32/kernel32/synch/timer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/synch/t…
============================================================================== --- trunk/reactos/dll/win32/kernel32/synch/timer.c (original) +++ trunk/reactos/dll/win32/kernel32/synch/timer.c Fri Jan 26 10:22:19 2007 @@ -9,8 +9,8 @@ /* INCLUDES *****************************************************************/ /* File contains Vista Semantics */ -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 +//#undef _WIN32_WINNT +//#define _WIN32_WINNT 0x0600 #include <k32.h> @@ -269,7 +269,7 @@ (PLARGE_INTEGER)pDueTime, (PTIMER_APC_ROUTINE)pfnCompletionRoutine, lpArgToCompletionRoutine, - fResume, + (BOOLEAN)fResume, lPeriod, NULL); if (NT_SUCCESS(Status)) return TRUE; Modified: trunk/reactos/dll/win32/kernel32/thread/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/thread/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/thread/thread.c (original) +++ trunk/reactos/dll/win32/kernel32/thread/thread.c Fri Jan 26 10:22:19 2007 @@ -838,7 +838,7 @@ * System time units are 100 nanoseconds (a nanosecond is a billionth of * a second). */ - Interval.QuadPart = -((ULONGLONG)dwMilliseconds * 10000); + Interval.QuadPart = -((LONGLONG)dwMilliseconds * 10000); } else { @@ -847,7 +847,7 @@ } dowait: - errCode = NtDelayExecution (bAlertable, &Interval); + errCode = NtDelayExecution ((BOOLEAN)bAlertable, &Interval); if ((bAlertable) && (errCode == STATUS_ALERTED)) goto dowait; return (errCode == STATUS_USER_APC) ? WAIT_IO_COMPLETION : 0; } @@ -865,7 +865,7 @@ { QUEUE_USER_WORKITEM_CONTEXT Info; - ASSERT(Context != NULL); + ASSERT(Context); /* Save the context to the stack */ Info = *(volatile QUEUE_USER_WORKITEM_CONTEXT *)Context; Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=2…
============================================================================== --- trunk/reactos/include/psdk/winnt.h (original) +++ trunk/reactos/include/psdk/winnt.h Fri Jan 26 10:22:19 2007 @@ -2669,7 +2669,9 @@ LIST_ENTRY ProcessLocksList; DWORD EntryCount; DWORD ContentionCount; - DWORD Spare[2]; + DWORD Flags; + WORD CreatorBackTraceIndexHigh; + WORD SpareWORD; } RTL_CRITICAL_SECTION_DEBUG,*PRTL_CRITICAL_SECTION_DEBUG; typedef struct _RTL_CRITICAL_SECTION { PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
17 years, 11 months
1
0
0
0
[ion] 25632: - Multiple fixes to ERESOURCE implementation.
by ion@svn.reactos.org
Author: ion Date: Fri Jan 26 02:48:48 2007 New Revision: 25632 URL:
http://svn.reactos.org/svn/reactos?rev=25632&view=rev
Log: - Multiple fixes to ERESOURCE implementation. Modified: trunk/reactos/ntoskrnl/ex/resource.c Modified: trunk/reactos/ntoskrnl/ex/resource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/resource.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/resource.c (original) +++ trunk/reactos/ntoskrnl/ex/resource.c Fri Jan 26 02:48:48 2007 @@ -20,16 +20,13 @@ #include <ntoskrnl.h> #define NDEBUG -#include <internal/debug.h> - -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpResourceInitialization) -#endif +#include <debug.h> /* Macros for reading resource flags */ #define IsExclusiveWaiting(r) (r->NumberOfExclusiveWaiters) #define IsSharedWaiting(r) (r->NumberOfSharedWaiters) #define IsOwnedExclusive(r) (r->Flag & ResourceOwnedExclusive) +#define IsBoostAllowed(r) (r->Flag & ResourceHasDisabledPriorityBoost) /* DATA***********************************************************************/ @@ -258,6 +255,7 @@ IN PKIRQL OldIrql) { POWNER_ENTRY Owner, Table; + KIRQL OldIrql2; ULONG NewSize, OldSize; DPRINT("ExpExpandResourceOwnerTable: %p\n", Resource); @@ -285,7 +283,7 @@ TAG_RESOURCE_TABLE); /* Zero the table */ - RtlZeroMemory((PVOID)(Table + OldSize), + RtlZeroMemory(Table + OldSize, (NewSize - OldSize) * sizeof(OWNER_ENTRY)); /* Lock the resource */ @@ -302,22 +300,24 @@ else { /* Copy the table */ - RtlCopyMemory((PVOID)Table, + RtlCopyMemory(Table, Owner, OldSize * sizeof(OWNER_ENTRY)); /* Acquire dispatcher lock to prevent thread boosting */ - KiAcquireDispatcherLockAtDpcLevel(); + OldIrql2 = KiAcquireDispatcherLock(); /* Set the new table data */ Table->TableSize = NewSize; Resource->OwnerTable = Table; + /* Release dispatcher lock */ + KiReleaseDispatcherLock(OldIrql2); + /* Sanity check */ ExpVerifyResource(Resource); - /* Release locks */ - KiReleaseDispatcherLockFromDpcLevel(); + /* Release lock */ ExReleaseResourceLock(&Resource->SpinLock, *OldIrql); /* Free the old table */ @@ -358,9 +358,7 @@ IN PKIRQL OldIrql) { POWNER_ENTRY Owner, Limit; - ULONG Size; POWNER_ENTRY FreeEntry = NULL; - DPRINT("ExpFindFreeEntry: %p\n", Resource); /* Sanity check */ ASSERT(OldIrql != 0); @@ -378,34 +376,24 @@ Owner = Resource->OwnerTable; if (Owner) { - /* Loop every entry */ - Size = Owner->TableSize; - Limit = &Owner[Size]; - - /* Go to the next entry and loop */ + /* Set the limit, move to the next owner and loop owner entries */ + Limit = &Owner[Owner->TableSize]; Owner++; do { - /* Check for a free entry */ + /* Check if the entry is free */ if (!Owner->OwnerThread) { - /* Found one, return it!*/ - FreeEntry = Owner; - break; + /* Update the resource entry and return it */ + KeGetCurrentThread()->ResourceIndex = (UCHAR)(Owner - + Resource-> + OwnerTable); + return Owner; } - /* Move on */ + /* Move to the next one */ Owner++; } while (Owner != Limit); - - /* If we found a free entry by now, return it */ - if (FreeEntry) - { - /* Set the resource index */ - KeGetCurrentThread()->ResourceIndex = - (UCHAR)(Owner - Resource->OwnerTable); - return FreeEntry; - } } /* No free entry, expand the table */ @@ -445,63 +433,39 @@ IN PKIRQL OldIrql) { POWNER_ENTRY FreeEntry, Owner, Limit; - ULONG Size; - DPRINT("ExpFindEntryForThread: %p\n", Resource); /* Start by looking in the static array */ - if (Resource->OwnerThreads[0].OwnerThread == Thread) - { - /* Found it, return it! */ - return &Resource->OwnerThreads[0]; - } - else if (Resource->OwnerThreads[1].OwnerThread == Thread) - { - /* Return it */ - return &Resource->OwnerThreads[1]; - } - else - { - /* Check if the first array is empty for our use */ - FreeEntry = NULL; - if (!Resource->OwnerThreads[1].OwnerThread) - { - /* Use this as the first free entry */ - FreeEntry = &Resource->OwnerThreads[1]; - } - - /* Get the current table pointer */ - Owner = Resource->OwnerTable; - if (!Owner) - { - /* The current table is empty, so no size */ - Size = 0; - } - else - { - /* We have a table, get it's size and limit */ - Size = Owner->TableSize; - Limit = &Owner[Size]; - - /* Go to the next entry and loop */ + Owner = &Resource->OwnerThreads[0]; + if (Owner->OwnerThread == Thread) return Owner; + Owner++; + if (Owner->OwnerThread == Thread) return Owner; + + /* Check if this is a free entry */ + FreeEntry = !Owner->OwnerThread ? Owner : NULL; + + /* Loop the table */ + Owner = Resource->OwnerTable; + if (Owner) + { + /* Calculate the limit, skip the first entry, and start looping */ + Limit = &Owner[Owner->TableSize]; + Owner++; + do + { + /* Check if we found a match */ + if (Owner->OwnerThread == Thread) + { + /* We did, update the index and return it */ + KeGetCurrentThread()->ResourceIndex = (UCHAR)(Owner - + Resource-> + OwnerTable); + return Owner; + } + + /* If we don't yet have a free entry and this one is, choose it */ + if (!(FreeEntry) && !(Owner->OwnerThread)) FreeEntry = Owner; Owner++; - do - { - /* Check for a match */ - if (Owner->OwnerThread == Thread) - { - /* Match found! Set the resource index */ - KeGetCurrentThread()->ResourceIndex = - (UCHAR)(Owner - Resource->OwnerTable); - return Owner; - } - - /* If we don't have a free entry yet, make this one free */ - if (!(FreeEntry) && !(Owner->OwnerThread)) FreeEntry = Owner; - - /* Move on */ - Owner++; - } while (Owner != Limit); - } + } while (Owner != Limit); } /* Check if it's OK to do an expansion */ @@ -511,8 +475,8 @@ if (FreeEntry) { /* Set the resource index */ - KeGetCurrentThread()->ResourceIndex = (UCHAR) - (Owner - Resource->OwnerTable); + KeGetCurrentThread()->ResourceIndex = (UCHAR)(FreeEntry - + Resource->OwnerTable); return FreeEntry; } @@ -538,19 +502,11 @@ * @remarks None. * *--*/ -#if 0 - -/* - * Disabled, read the comments bellow. - */ VOID FASTCALL ExpBoostOwnerThread(IN PKTHREAD Thread, IN PKTHREAD OwnerThread) { - BOOLEAN Released = FALSE; - DPRINT("ExpBoostOwnerThread: %p\n", Thread); - /* Make sure the owner thread is a pointer, not an ID */ if (!((ULONG_PTR)OwnerThread & 0x3)) { @@ -558,8 +514,8 @@ if ((OwnerThread->Priority < Thread->Priority) && (OwnerThread->Priority < 14)) { - /* Make sure we're at dispatch */ - ASSERT(KeGetCurrentIrql() >= DISPATCH_LEVEL); + /* Acquire the thread lock */ + KiAcquireThreadLock(Thread); /* Set the new priority */ OwnerThread->PriorityDecrement += 14 - OwnerThread->Priority; @@ -568,17 +524,13 @@ OwnerThread->Quantum = OwnerThread->QuantumReset; /* Update the kernel state */ - KiSetPriorityThread(OwnerThread, 14, &Released); - - /* Reacquire lock if it got releases */ - if (Released) KiAcquireDispatcherLockFromDpcLevel(); - - /* Make sure we're still at dispatch */ - ASSERT(KeGetCurrentIrql() >= DISPATCH_LEVEL); - } - } -} -#endif + KiSetPriorityThread(OwnerThread, 14); + + /* Release the thread lock */ + KiReleaseThreadLock(Thread); + } + } +} /*++ * @name ExpWaitForResource @@ -601,20 +553,21 @@ ExpWaitForResource(IN PERESOURCE_XP Resource, IN PVOID Object) { -#if DBG ULONG i; ULONG Size; - KIRQL OldIrql; POWNER_ENTRY Owner; -#endif ULONG WaitCount = 0; NTSTATUS Status; LARGE_INTEGER Timeout; + PKTHREAD Thread, OwnerThread; +#if DBG + KIRQL OldIrql; +#endif /* Increase contention count and use a 5 second timeout */ Resource->ContentionCount++; Timeout.QuadPart = 500 * -10000; - for(;;) + for (;;) { /* Wait for ownership */ Status = KeWaitForSingleObject(Object, @@ -675,20 +628,10 @@ ExReleaseResourceLock(&Resource->SpinLock, OldIrql); #endif } -#if 0 -/* - * Disabled because: - * - We cannot access the OwnerTable without locking the resource. - * - The shared waiters may wait also on the semaphore. It makes no sense to boost a waiting thread. - * - The thread header is initialized like KeWaitForSingleObject (?, ?, ?, TRUE, ?). - * During the boost, possible the dispatcher lock is released but the thread block (WaitNext) isn't changed. - */ /* Check if we can boost */ - if (!(Resource->Flag & ResourceHasDisabledPriorityBoost)) - { - PKTHREAD Thread, OwnerThread; - + if (IsBoostAllowed(Resource)) + { /* Get the current kernel thread and lock the dispatcher */ Thread = KeGetCurrentThread(); Thread->WaitIrql = KiAcquireDispatcherLock(); @@ -725,7 +668,6 @@ } } } -#endif } } @@ -791,8 +733,6 @@ /* Check if there is a shared owner or exclusive owner */ TryAcquire: - DPRINT("ExAcquireResourceExclusiveLite(Resource 0x%p, Wait %d)\n", - Resource, Wait); if (Resource->ActiveCount) { /* Check if it's exclusively owned, and we own it */ @@ -831,7 +771,7 @@ ExpWaitForResource(Resource, Resource->ExclusiveWaiters); /* Set owner and return success */ - Resource->OwnerThreads[0].OwnerThread = Thread; + Resource->OwnerThreads[0].OwnerThread = ExGetCurrentResourceThread(); return TRUE; } } @@ -905,21 +845,10 @@ /* See if nobody owns us */ TryAcquire: - DPRINT("ExAcquireResourceSharedLite(Resource 0x%p, Wait %d)\n", - Resource, Wait); if (!Resource->ActiveCount) { - if (Resource->NumberOfSharedWaiters == 0) - { - Owner = &Resource->OwnerThreads[1]; - } - else - { - /* Find a free entry */ - Owner = ExpFindFreeEntry(Resource, &OldIrql); - if (!Owner) goto TryAcquire; - } - + /* Setup the owner entry */ + Owner = &Resource->OwnerThreads[1]; Owner->OwnerThread = Thread; Owner->OwnerCount = 1; Resource->ActiveCount = 1; @@ -1066,8 +995,6 @@ /* See if nobody owns us */ TryAcquire: - DPRINT("ExAcquireSharedStarveExclusive(Resource 0x%p, Wait %d)\n", - Resource, Wait); if (!Resource->ActiveCount) { /* Nobody owns it, so let's take control */ @@ -1097,22 +1024,6 @@ /* Find a free entry */ Owner = ExpFindFreeEntry(Resource, &OldIrql); if (!Owner) goto TryAcquire; - - /* If we got here, then we need to wait. Are we allowed? */ - if (!Wait) - { - /* Release the lock and return */ - ExReleaseResourceLock(&Resource->SpinLock, OldIrql); - return TRUE; - } - - /* Check if we have a shared waiters semaphore */ - if (!Resource->SharedWaiters) - { - /* Allocate one and try again */ - ExpAllocateSharedWaiterSemaphore(Resource, &OldIrql); - goto TryAcquire; - } } else { @@ -1194,8 +1105,8 @@ *--*/ BOOLEAN NTAPI -ExAcquireSharedWaitForExclusive(PERESOURCE resource, - BOOLEAN Wait) +ExAcquireSharedWaitForExclusive(IN PERESOURCE resource, + IN BOOLEAN Wait) { KIRQL OldIrql; ERESOURCE_THREAD Thread; @@ -1214,8 +1125,6 @@ /* See if nobody owns us */ TryAcquire: - DPRINT("ExAcquireSharedWaitForExclusive(Resource 0x%p, Wait %d)\n", - Resource, Wait); if (!Resource->ActiveCount) { /* Nobody owns it, so let's take control */ @@ -1241,16 +1150,20 @@ ExReleaseResourceLock(&Resource->SpinLock, OldIrql); return TRUE; } - else - { - /* Find a free entry */ - Owner = ExpFindFreeEntry(Resource, &OldIrql); - if (!Owner) goto TryAcquire; - - /* If we got here, then we need to wait. Are we allowed? */ + + /* Find a free entry */ + Owner = ExpFindFreeEntry(Resource, &OldIrql); + if (!Owner) goto TryAcquire; + } + else + { + /* Try to find if there are exclusive waiters */ + if (IsExclusiveWaiting(Resource)) + { + /* We have to wait for the exclusive waiter to be done */ if (!Wait) { - /* Release the lock and return */ + /* So bail out if we're not allowed */ ExReleaseResourceLock(&Resource->SpinLock, OldIrql); return TRUE; } @@ -1263,38 +1176,6 @@ goto TryAcquire; } - /* Now take control of the resource */ - Owner->OwnerThread = Thread; - Owner->OwnerCount = 1; - Resource->NumberOfSharedWaiters++; - - /* Release the lock and wait for it to be ours */ - ExReleaseResourceLock(&Resource->SpinLock, OldIrql); - ExpWaitForResource(Resource, Resource->SharedWaiters); - return TRUE; - } - } - else - { - /* Try to find if there are exclusive waiters */ - if (IsExclusiveWaiting(Resource)) - { - /* We have to wait for the exclusive waiter to be done */ - if (!Wait) - { - /* So bail out if we're not allowed */ - ExReleaseResourceLock(&Resource->SpinLock, OldIrql); - return TRUE; - } - - /* Check if we have a shared waiters semaphore */ - if (!Resource->SharedWaiters) - { - /* Allocate one and try again */ - ExpAllocateSharedWaiterSemaphore(Resource, &OldIrql); - goto TryAcquire; - } - /* Now wait for the resource */ Resource->NumberOfSharedWaiters++; ExReleaseResourceLock(&Resource->SpinLock, OldIrql); @@ -1304,7 +1185,7 @@ ExAcquireResourceLock(&Resource->SpinLock, &OldIrql); /* Find who owns it now */ - Owner = ExpFindEntryForThread(Resource, Thread, &OldIrql); + while (!(Owner = ExpFindEntryForThread(Resource, Thread, &OldIrql))); /* Sanity checks */ ASSERT(IsOwnedExclusive(Resource) == FALSE); @@ -1347,6 +1228,32 @@ return TRUE; } } + + /* We have to wait for the exclusive waiter to be done */ + if (!Wait) + { + /* So bail out if we're not allowed */ + ExReleaseResourceLock(&Resource->SpinLock, OldIrql); + return TRUE; + } + + /* Check if we have a shared waiters semaphore */ + if (!Resource->SharedWaiters) + { + /* Allocate one and try again */ + ExpAllocateSharedWaiterSemaphore(Resource, &OldIrql); + goto TryAcquire; + } + + /* Take control */ + Owner->OwnerThread = Thread; + Owner->OwnerCount = 1; + Resource->NumberOfSharedWaiters++; + + /* Release the lock and return */ + ExReleaseResourceLock(&Resource->SpinLock, OldIrql); + ExpWaitForResource(Resource, Resource->SharedWaiters); + return TRUE; } /*++ @@ -1372,10 +1279,6 @@ ULONG OldWaiters; KIRQL OldIrql; PERESOURCE_XP Resource = (PERESOURCE_XP)resource; - DPRINT("ExConvertExclusiveToSharedLite(Resource 0x%p)\n", Resource); - - /* Lock the resource */ - ExAcquireResourceLock(&Resource->SpinLock, &OldIrql); /* Sanity checks */ ASSERT(KeIsExecutingDpc() == FALSE); @@ -1383,14 +1286,17 @@ ASSERT(IsOwnedExclusive(Resource)); ASSERT(Resource->OwnerThreads[0].OwnerThread == (ERESOURCE_THREAD)PsGetCurrentThread()); + /* Lock the resource */ + ExAcquireResourceLock(&Resource->SpinLock, &OldIrql); + /* Erase the exclusive flag */ Resource->Flag &= ~ResourceOwnedExclusive; /* Check if we have shared waiters */ - OldWaiters = Resource->NumberOfSharedWaiters; - if (OldWaiters) + if (IsSharedWaiting(Resource)) { /* Make the waiters active owners */ + OldWaiters = Resource->NumberOfSharedWaiters; Resource->ActiveCount = Resource->ActiveCount + (USHORT)OldWaiters; Resource->NumberOfSharedWaiters = 0; @@ -1427,7 +1333,6 @@ { KIRQL OldIrql; PERESOURCE_XP Resource = (PERESOURCE_XP)resource; - DPRINT("ExDeleteResourceLite(Resource 0x%p)\n", Resource); /* Sanity checks */ ASSERT(IsSharedWaiting(Resource) == FALSE); @@ -1559,7 +1464,6 @@ ExInitializeResourceLite(PERESOURCE resource) { PERESOURCE_XP Resource = (PERESOURCE_XP)resource; - DPRINT("ExInitializeResourceLite(Resource 0x%p)\n", Resource); /* Clear the structure */ RtlZeroMemory(Resource, sizeof(ERESOURCE_XP)); @@ -1806,7 +1710,6 @@ KIRQL OldIrql; POWNER_ENTRY Owner, Limit; PERESOURCE_XP Resource = (PERESOURCE_XP)resource; - DPRINT("ExReleaseResourceLite: %p\n", Resource); /* Sanity check */ ExpVerifyResource(Resource); @@ -1832,42 +1735,45 @@ /* Clear the owner */ Resource->OwnerThreads[0].OwnerThread = 0; - /* Check if there are shared waiters */ - if (IsSharedWaiting(Resource)) - { - /* Remove the exclusive flag */ - Resource->Flag &= ~ResourceOwnedExclusive; - - /* Give ownage to another thread */ - Count = Resource->NumberOfSharedWaiters; - Resource->ActiveCount = (USHORT)Count; - Resource->NumberOfSharedWaiters = 0; - - /* Release lock and let someone else have it */ - ExReleaseResourceLock(&Resource->SpinLock, OldIrql); - KeReleaseSemaphore(Resource->SharedWaiters, 0, Count, FALSE); - return; - } - else if (IsExclusiveWaiting(Resource)) - { - /* Give exclusive access */ - Resource->OwnerThreads[0].OwnerThread = 1; - Resource->OwnerThreads[0].OwnerCount = 1; - Resource->ActiveCount = 1; - Resource->NumberOfExclusiveWaiters--; - - /* Release the lock and give it away */ - ExReleaseResourceLock(&Resource->SpinLock, OldIrql); - KeSetEventBoostPriority(Resource->ExclusiveWaiters, - (PKTHREAD*) - &Resource->OwnerThreads[0].OwnerThread); - return; - } + /* Check the active count */ + ASSERT(Resource->ActiveCount > 0); + if (!(--Resource->ActiveCount)) + { + /* Check if there are shared waiters */ + if (IsSharedWaiting(Resource)) + { + /* Remove the exclusive flag */ + Resource->Flag &= ~ResourceOwnedExclusive; + + /* Give ownage to another thread */ + Count = Resource->NumberOfSharedWaiters; + Resource->ActiveCount = (SHORT)Count; + Resource->NumberOfSharedWaiters = 0; + + /* Release lock and let someone else have it */ + ExReleaseResourceLock(&Resource->SpinLock, OldIrql); + KeReleaseSemaphore(Resource->SharedWaiters, 0, Count, FALSE); + return; + } + else if (IsExclusiveWaiting(Resource)) + { + /* Give exclusive access */ + Resource->OwnerThreads[0].OwnerThread = 1; + Resource->OwnerThreads[0].OwnerCount = 1; + Resource->ActiveCount = 1; + Resource->NumberOfExclusiveWaiters--; + + /* Release the lock and give it away */ + ExReleaseResourceLock(&Resource->SpinLock, OldIrql); + KeSetEventBoostPriority(Resource->ExclusiveWaiters, + (PKTHREAD*) + &Resource->OwnerThreads[0].OwnerThread); + return; + } + } /* Remove the exclusive flag */ Resource->Flag &= ~ResourceOwnedExclusive; - - Resource->ActiveCount = 0; } else { @@ -1876,6 +1782,11 @@ { /* Found it, get owner */ Owner = &Resource->OwnerThreads[1]; + } + else if (Resource->OwnerThreads[0].OwnerThread == Thread) + { + /* Found it, get owner */ + Owner = &Resource->OwnerThreads[0]; } else { @@ -1965,7 +1876,6 @@ /* Release lock */ ExReleaseResourceLock(&Resource->SpinLock, OldIrql); - return; } /*++ @@ -1998,7 +1908,6 @@ POWNER_ENTRY Owner; PERESOURCE_XP Resource = (PERESOURCE_XP)resource; ASSERT(Thread != 0); - DPRINT("ExReleaseResourceForThreadLite: %p\n", Resource); /* Get the thread and lock the resource */ ExAcquireResourceLock(&Resource->SpinLock, &OldIrql); @@ -2034,7 +1943,7 @@ /* Give ownage to another thread */ Count = Resource->NumberOfSharedWaiters; - Resource->ActiveCount = (USHORT)Count; + Resource->ActiveCount = (SHORT)Count; Resource->NumberOfSharedWaiters = 0; /* Release lock and let someone else have it */ @@ -2147,7 +2056,6 @@ /* Release lock */ ExReleaseResourceLock(&Resource->SpinLock, OldIrql); - return; } /*++ @@ -2266,7 +2174,6 @@ KIRQL OldIrql; BOOLEAN Acquired = FALSE; PERESOURCE_XP Resource = (PERESOURCE_XP)resource; - DPRINT("ExTryToAcquireResourceExclusiveLite: %p\n", Resource); /* Sanity check */ ASSERT((Resource->Flag & ResourceNeverExclusive) == 0);
17 years, 11 months
1
0
0
0
[ion] 25631: - Clean up kernel32\thread.c and fix some bugs. - Implement KeSetDisableBoostThread. - Temporarily disable SEH/validation in NtQuery/SetProcess/ThreadInformation routines since it was making all calls fail. - Fix bugs when using ThreadPriority, ThreadBasePriority, ThreadAffinityMask. Parameters are now validated properly, and affinity masked with the process. - Implement ThreadSetIdealProcessor and ThreadPriorityBoost case. - Implement ThreadZeroTlsCell case. TLS should now work pro
by ion@svn.reactos.org
Author: ion Date: Fri Jan 26 01:39:32 2007 New Revision: 25631 URL:
http://svn.reactos.org/svn/reactos?rev=25631&view=rev
Log: - Clean up kernel32\thread.c and fix some bugs. - Implement KeSetDisableBoostThread. - Temporarily disable SEH/validation in NtQuery/SetProcess/ThreadInformation routines since it was making all calls fail. - Fix bugs when using ThreadPriority, ThreadBasePriority, ThreadAffinityMask. Parameters are now validated properly, and affinity masked with the process. - Implement ThreadSetIdealProcessor and ThreadPriorityBoost case. - Implement ThreadZeroTlsCell case. TLS should now work properly. - Make kernel32_winetest for threads usable. - Update Kernel Fun. Modified: trunk/reactos/ (props changed) trunk/reactos/dll/win32/kernel32/thread/thread.c trunk/reactos/include/ddk/ntifs.h trunk/reactos/ntoskrnl/KrnlFun.c trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/ke/balmgr.c trunk/reactos/ntoskrnl/ke/thrdobj.c trunk/reactos/ntoskrnl/ps/query.c trunk/reactos/regtests/winetests/kernel32/thread.c Propchange: trunk/reactos/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Fri Jan 26 01:39:32 2007 @@ -34,3 +34,4 @@ *.sln RosBE-Logs *.suo +dependencymap.xml Modified: trunk/reactos/dll/win32/kernel32/thread/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/thread/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/thread/thread.c (original) +++ trunk/reactos/dll/win32/kernel32/thread/thread.c Fri Jan 26 01:39:32 2007 @@ -258,39 +258,37 @@ * @implemented */ HANDLE -STDCALL -OpenThread( - DWORD dwDesiredAccess, - BOOL bInheritHandle, - DWORD dwThreadId - ) -{ - NTSTATUS errCode; - HANDLE ThreadHandle; - OBJECT_ATTRIBUTES ObjectAttributes; - CLIENT_ID ClientId ; - - ClientId.UniqueProcess = 0; - ClientId.UniqueThread = (HANDLE)dwThreadId; - - InitializeObjectAttributes (&ObjectAttributes, - NULL, - (bInheritHandle ? OBJ_INHERIT : 0), - NULL, - NULL); - - errCode = NtOpenThread(&ThreadHandle, - dwDesiredAccess, - &ObjectAttributes, - &ClientId); - if (!NT_SUCCESS(errCode)) - { - SetLastErrorByStatus (errCode); - return NULL; - } - return ThreadHandle; -} - +WINAPI +OpenThread(DWORD dwDesiredAccess, + BOOL bInheritHandle, + DWORD dwThreadId) +{ + NTSTATUS errCode; + HANDLE ThreadHandle; + OBJECT_ATTRIBUTES ObjectAttributes; + CLIENT_ID ClientId ; + + ClientId.UniqueProcess = 0; + ClientId.UniqueThread = (HANDLE)dwThreadId; + + InitializeObjectAttributes(&ObjectAttributes, + NULL, + (bInheritHandle ? OBJ_INHERIT : 0), + NULL, + NULL); + + errCode = NtOpenThread(&ThreadHandle, + dwDesiredAccess, + &ObjectAttributes, + &ClientId); + if (!NT_SUCCESS(errCode)) + { + SetLastErrorByStatus (errCode); + return NULL; + } + + return ThreadHandle; +} /* * @implemented @@ -298,252 +296,239 @@ PTEB GetTeb(VOID) { - return(NtCurrentTeb()); -} - - -/* - * @implemented - */ -BOOL STDCALL + return NtCurrentTeb(); +} + +/* + * @implemented + */ +BOOL +WINAPI SwitchToThread(VOID) { - NTSTATUS Status; - Status = NtYieldExecution(); - return Status != STATUS_NO_YIELD_PERFORMED; -} - - -/* - * @implemented - */ -DWORD STDCALL + NTSTATUS Status; + Status = NtYieldExecution(); + return Status != STATUS_NO_YIELD_PERFORMED; +} + + +/* + * @implemented + */ +DWORD +WINAPI GetCurrentThreadId(VOID) { - return((DWORD)(NtCurrentTeb()->Cid).UniqueThread); -} - -/* - * @implemented - */ -BOOL STDCALL + return (DWORD)(NtCurrentTeb()->Cid).UniqueThread; +} + +/* + * @implemented + */ +BOOL +NTAPI GetThreadTimes(HANDLE hThread, - LPFILETIME lpCreationTime, - LPFILETIME lpExitTime, - LPFILETIME lpKernelTime, - LPFILETIME lpUserTime) -{ - KERNEL_USER_TIMES KernelUserTimes; - NTSTATUS Status; - - Status = NtQueryInformationThread(hThread, - ThreadTimes, - &KernelUserTimes, - sizeof(KERNEL_USER_TIMES), - NULL); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(FALSE); - } - - lpCreationTime->dwLowDateTime = KernelUserTimes.CreateTime.u.LowPart; - lpCreationTime->dwHighDateTime = KernelUserTimes.CreateTime.u.HighPart; - - lpExitTime->dwLowDateTime = KernelUserTimes.ExitTime.u.LowPart; - lpExitTime->dwHighDateTime = KernelUserTimes.ExitTime.u.HighPart; - - lpKernelTime->dwLowDateTime = KernelUserTimes.KernelTime.u.LowPart; - lpKernelTime->dwHighDateTime = KernelUserTimes.KernelTime.u.HighPart; - - lpUserTime->dwLowDateTime = KernelUserTimes.UserTime.u.LowPart; - lpUserTime->dwHighDateTime = KernelUserTimes.UserTime.u.HighPart; - - return(TRUE); -} - - -/* - * @implemented - */ -BOOL STDCALL + LPFILETIME lpCreationTime, + LPFILETIME lpExitTime, + LPFILETIME lpKernelTime, + LPFILETIME lpUserTime) +{ + KERNEL_USER_TIMES KernelUserTimes; + NTSTATUS Status; + + Status = NtQueryInformationThread(hThread, + ThreadTimes, + &KernelUserTimes, + sizeof(KERNEL_USER_TIMES), + NULL); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return(FALSE); + } + + *lpCreationTime = *(LPFILETIME)&KernelUserTimes.CreateTime; + *lpExitTime = *(LPFILETIME)&KernelUserTimes.ExitTime; + *lpKernelTime = *(LPFILETIME)&KernelUserTimes.KernelTime; + *lpUserTime = *(LPFILETIME)&KernelUserTimes.UserTime; + return TRUE; +} + +/* + * @implemented + */ +BOOL +WINAPI GetThreadContext(HANDLE hThread, - LPCONTEXT lpContext) -{ - NTSTATUS Status; - - Status = NtGetContextThread(hThread, - lpContext); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(FALSE); - } - - return(TRUE); -} - - -/* - * @implemented - */ -BOOL STDCALL + LPCONTEXT lpContext) +{ + NTSTATUS Status; + + Status = NtGetContextThread(hThread, lpContext); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; +} + +/* + * @implemented + */ +BOOL +WINAPI SetThreadContext(HANDLE hThread, - CONST CONTEXT *lpContext) -{ - NTSTATUS Status; - - Status = NtSetContextThread(hThread, - (void *)lpContext); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(FALSE); - } - - return(TRUE); -} - - -/* - * @implemented - */ -BOOL STDCALL + CONST CONTEXT *lpContext) +{ + NTSTATUS Status; + + Status = NtSetContextThread(hThread, (PCONTEXT)lpContext); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; +} + +/* + * @implemented + */ +BOOL +WINAPI GetExitCodeThread(HANDLE hThread, - LPDWORD lpExitCode) -{ - THREAD_BASIC_INFORMATION ThreadBasic; - NTSTATUS Status; - - Status = NtQueryInformationThread(hThread, - ThreadBasicInformation, - &ThreadBasic, - sizeof(THREAD_BASIC_INFORMATION), - NULL); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(FALSE); - } - - memcpy(lpExitCode, &ThreadBasic.ExitStatus, sizeof(DWORD)); - - return(TRUE); -} - - -/* - * @implemented - */ -DWORD STDCALL + LPDWORD lpExitCode) +{ + THREAD_BASIC_INFORMATION ThreadBasic; + NTSTATUS Status; + + Status = NtQueryInformationThread(hThread, + ThreadBasicInformation, + &ThreadBasic, + sizeof(THREAD_BASIC_INFORMATION), + NULL); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return(FALSE); + } + + *lpExitCode = ThreadBasic.ExitStatus; + return TRUE; +} + +/* + * @implemented + */ +DWORD +WINAPI ResumeThread(HANDLE hThread) { - ULONG PreviousResumeCount; - NTSTATUS Status; - - Status = NtResumeThread(hThread, - &PreviousResumeCount); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(-1); - } - - return(PreviousResumeCount); -} - - -/* - * @implemented - */ -BOOL STDCALL + ULONG PreviousResumeCount; + NTSTATUS Status; + + Status = NtResumeThread(hThread, &PreviousResumeCount); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return -1; + } + + return PreviousResumeCount; +} + +/* + * @implemented + */ +BOOL +WINAPI TerminateThread(HANDLE hThread, - DWORD dwExitCode) -{ - NTSTATUS Status; - - if (0 == hThread) - { - SetLastError(ERROR_INVALID_HANDLE); - return(FALSE); - } - - Status = NtTerminateThread(hThread, - dwExitCode); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(FALSE); - } - - return(TRUE); -} - - -/* - * @implemented - */ -DWORD STDCALL + DWORD dwExitCode) +{ + NTSTATUS Status; + + if (!hThread) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + Status = NtTerminateThread(hThread, dwExitCode); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; +} + +/* + * @implemented + */ +DWORD +WINAPI SuspendThread(HANDLE hThread) { - ULONG PreviousSuspendCount; - NTSTATUS Status; - - Status = NtSuspendThread(hThread, - &PreviousSuspendCount); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(-1); - } - - return(PreviousSuspendCount); -} - - -/* - * @implemented - */ -DWORD STDCALL + ULONG PreviousSuspendCount; + NTSTATUS Status; + + Status = NtSuspendThread(hThread, &PreviousSuspendCount); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return -1; + } + + return PreviousSuspendCount; +} + +/* + * @implemented + */ +DWORD +WINAPI SetThreadAffinityMask(HANDLE hThread, - DWORD dwThreadAffinityMask) -{ - THREAD_BASIC_INFORMATION ThreadBasic; - KAFFINITY AffinityMask; - NTSTATUS Status; - - AffinityMask = (KAFFINITY)dwThreadAffinityMask; - - Status = NtQueryInformationThread(hThread, - ThreadBasicInformation, - &ThreadBasic, - sizeof(THREAD_BASIC_INFORMATION), - NULL); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(0); - } - - Status = NtSetInformationThread(hThread, - ThreadAffinityMask, - &AffinityMask, - sizeof(KAFFINITY)); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - ThreadBasic.AffinityMask = 0; - } - - return(ThreadBasic.AffinityMask); -} - + DWORD dwThreadAffinityMask) +{ + THREAD_BASIC_INFORMATION ThreadBasic; + KAFFINITY AffinityMask; + NTSTATUS Status; + + AffinityMask = (KAFFINITY)dwThreadAffinityMask; + + Status = NtQueryInformationThread(hThread, + ThreadBasicInformation, + &ThreadBasic, + sizeof(THREAD_BASIC_INFORMATION), + NULL); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return 0; + } + + Status = NtSetInformationThread(hThread, + ThreadAffinityMask, + &AffinityMask, + sizeof(KAFFINITY)); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + ThreadBasic.AffinityMask = 0; + } + + return ThreadBasic.AffinityMask; +} /* * @implemented */ BOOL -STDCALL +WINAPI SetThreadPriority(HANDLE hThread, int nPriority) { @@ -580,7 +565,7 @@ * @implemented */ int -STDCALL +WINAPI GetThreadPriority(HANDLE hThread) { THREAD_BASIC_INFORMATION ThreadBasic; @@ -616,55 +601,54 @@ /* * @implemented */ -BOOL STDCALL +BOOL +WINAPI GetThreadPriorityBoost(IN HANDLE hThread, - OUT PBOOL pDisablePriorityBoost) -{ - ULONG PriorityBoost; - NTSTATUS Status; - - Status = NtQueryInformationThread(hThread, - ThreadPriorityBoost, - &PriorityBoost, - sizeof(ULONG), - NULL); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(FALSE); - } - - *pDisablePriorityBoost = !((BOOL)PriorityBoost); - - return(TRUE); -} - - -/* - * @implemented - */ -BOOL STDCALL + OUT PBOOL pDisablePriorityBoost) +{ + ULONG PriorityBoost; + NTSTATUS Status; + + Status = NtQueryInformationThread(hThread, + ThreadPriorityBoost, + &PriorityBoost, + sizeof(ULONG), + NULL); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + *pDisablePriorityBoost = PriorityBoost; + return TRUE; +} + +/* + * @implemented + */ +BOOL +NTAPI SetThreadPriorityBoost(IN HANDLE hThread, - IN BOOL bDisablePriorityBoost) -{ - ULONG PriorityBoost; - NTSTATUS Status; - - PriorityBoost = (ULONG)!bDisablePriorityBoost; - - Status = NtSetInformationThread(hThread, - ThreadPriorityBoost, - &PriorityBoost, - sizeof(ULONG)); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return(FALSE); - } - - return(TRUE); -} - + IN BOOL bDisablePriorityBoost) +{ + ULONG PriorityBoost; + NTSTATUS Status; + + PriorityBoost = (ULONG)bDisablePriorityBoost; + + Status = NtSetInformationThread(hThread, + ThreadPriorityBoost, + &PriorityBoost, + sizeof(ULONG)); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; +} /* * @implemented @@ -693,29 +677,28 @@ return TRUE; } - -/* - * @implemented - */ -DWORD STDCALL +/* + * @implemented + */ +DWORD +WINAPI SetThreadIdealProcessor(HANDLE hThread, - DWORD dwIdealProcessor) -{ - NTSTATUS Status; - - Status = NtSetInformationThread(hThread, - ThreadIdealProcessor, - &dwIdealProcessor, - sizeof(ULONG)); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return -1; - } - - return dwIdealProcessor; -} - + DWORD dwIdealProcessor) +{ + NTSTATUS Status; + + Status = NtSetInformationThread(hThread, + ThreadIdealProcessor, + &dwIdealProcessor, + sizeof(ULONG)); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return -1; + } + + return dwIdealProcessor; +} /* * @implemented @@ -740,7 +723,6 @@ return (DWORD)ThreadBasic.ClientId.UniqueProcess; } - /* * @implemented */ Modified: trunk/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=25…
============================================================================== --- trunk/reactos/include/ddk/ntifs.h (original) +++ trunk/reactos/include/ddk/ntifs.h Fri Jan 26 01:39:32 2007 @@ -3064,6 +3064,14 @@ ); NTKERNELAPI +UCHAR +NTAPI +KeSetIdealProcessorThread( + IN OUT PKTHREAD Thread, + IN UCHAR Processor +); + +NTKERNELAPI NTSTATUS NTAPI IoAttachDeviceToDeviceStackSafe( Modified: trunk/reactos/ntoskrnl/KrnlFun.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/KrnlFun.c (original) +++ trunk/reactos/ntoskrnl/KrnlFun.c Fri Jan 26 01:39:32 2007 @@ -14,8 +14,10 @@ // // Global: // - TODO: Complete the list of bufxies +// - Fix hang/slowdown during boot -> New scheduler +// - Fix freelist.c errors with new scheduler enabled. // - Fix process reference count leak. -// - Fix atapi.sys loading one more time at each boot. +// - Fix atapi.sys or serial.sys loading one more time at each boot. // - Fix LiveCD. // /////////////////////////////////////////////////////////////////////////////// @@ -25,12 +27,12 @@ // / \ // | OB, PS, LPC, DBGK, EX, INIT => "Code complete". No expected changes until 0.5.0 | | // | SE => Not looked at. Interaction with Ps/Io is minimal and currently hacked away. Preserve. |J| -// | KD/KDBG => Laptop has special version of ROS without these components. Commit in branch. |A| -// | HAL => Needs APC/DPC/IRQL implementation fixed ASAP in terms of interaction with Ke. |N| -// | || || || || || || || || || || || || | | -// | \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ |F| -// | BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES |E| -// | KE => Enable new thread scheduler and ensure it works. |B| +// | HAL => Needs APC/DPC/IRQL implementation fixed ASAP in terms of interaction with Ke. |A| +// | || || || || || || || || || || || || |N| +// | \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ | | +// | BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES |F| +// | KE => Enable new thread scheduler and ensure it works. |E| +// | KD/KDBG => Laptop has special version of ROS without these components. Commit in branch. |B| // | KD => Implement KD64 6.0, compatible with WinDBG | | // | || || || || || || || || || || || || |M| // | \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ |A| Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h Fri Jan 26 01:39:32 2007 @@ -217,6 +217,13 @@ IN PKTHREAD Thread ); +BOOLEAN +NTAPI +KeSetDisableBoostThread( + IN OUT PKTHREAD Thread, + IN BOOLEAN Disable +); + VOID NTAPI KeBalanceSetManager(IN PVOID Context); @@ -225,7 +232,7 @@ NTAPI KiReadyThread(IN PKTHREAD Thread); -NTSTATUS +ULONG NTAPI KeSuspendThread(PKTHREAD Thread); Modified: trunk/reactos/ntoskrnl/ke/balmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/balmgr.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ke/balmgr.c (original) +++ trunk/reactos/ntoskrnl/ke/balmgr.c Fri Jan 26 01:39:32 2007 @@ -76,6 +76,7 @@ if (WaitLimit >= Thread->WaitTime) { /* Remove the thread from the queue */ + DPRINT1("Thread: %p\n", Thread); NextEntry = NextEntry->Blink; ASSERT((Prcb->ReadySummary & PRIORITY_MASK(Index))); if (RemoveEntryList(NextEntry->Flink)) 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 (original) +++ trunk/reactos/ntoskrnl/ke/thrdobj.c Fri Jan 26 01:39:32 2007 @@ -89,6 +89,26 @@ /* Lower IRQl and return Increment */ KeLowerIrql(OldIrql); return BaseIncrement; +} + +BOOLEAN +NTAPI +KeSetDisableBoostThread(IN OUT PKTHREAD Thread, + IN BOOLEAN Disable) +{ + ASSERT_THREAD(Thread); + + /* Check if we're enabling or disabling */ + if (Disable != FALSE) + { + /* Set the bit */ + return InterlockedBitTestAndSet(&Thread->ThreadFlags, 1); + } + else + { + /* Remove the bit */ + return InterlockedBitTestAndReset(&Thread->ThreadFlags, 1); + } } VOID @@ -531,7 +551,7 @@ NULL); } -NTSTATUS +ULONG NTAPI KeSuspendThread(PKTHREAD Thread) { Modified: trunk/reactos/ntoskrnl/ps/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/ps/query.c (original) +++ trunk/reactos/ntoskrnl/ps/query.c Fri Jan 26 01:39:32 2007 @@ -63,7 +63,7 @@ { PEPROCESS Process; KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; ULONG Length = 0; PPROCESS_BASIC_INFORMATION ProcessBasicInfo = (PPROCESS_BASIC_INFORMATION)ProcessInformation; @@ -78,6 +78,7 @@ PAGED_CODE(); /* Check validity of Information Class */ +#if 0 Status = DefaultQueryInfoBufferCheck(ProcessInformationClass, PsProcessInfoClass, RTL_NUMBER_OF(PsProcessInfoClass), @@ -86,6 +87,7 @@ ReturnLength, PreviousMode); if (!NT_SUCCESS(Status)) return Status; +#endif /* Check if this isn't the cookie class */ if(ProcessInformationClass != ProcessCookie) @@ -490,6 +492,7 @@ PAGED_CODE(); /* Verify Information Class validity */ +#if 0 Status = DefaultSetInfoBufferCheck(ProcessInformationClass, PsProcessInfoClass, RTL_NUMBER_OF(PsProcessInfoClass), @@ -497,6 +500,7 @@ ProcessInformationLength, PreviousMode); if (!NT_SUCCESS(Status)) return Status; +#endif /* Check what class this is */ Access = PROCESS_SET_INFORMATION; @@ -718,12 +722,18 @@ NTSTATUS Status; HANDLE TokenHandle = NULL; KPRIORITY Priority = 0; - KAFFINITY Affinity = 0; + KAFFINITY Affinity = 0, CombinedAffinity; PVOID Address = NULL; PEPROCESS Process; + ULONG DisableBoost = 0; + ULONG IdealProcessor = 0; + PTEB Teb; + ULONG TlsIndex = 0; + PVOID *ExpansionSlots; PAGED_CODE(); /* Verify Information Class validity */ +#if 0 Status = DefaultSetInfoBufferCheck(ThreadInformationClass, PsThreadInfoClass, RTL_NUMBER_OF(PsThreadInfoClass), @@ -731,6 +741,7 @@ ThreadInformationLength, PreviousMode); if (!NT_SUCCESS(Status)) return Status; +#endif /* Check what class this is */ Access = THREAD_SET_INFORMATION; @@ -769,6 +780,15 @@ _SEH_END; if (!NT_SUCCESS(Status)) break; + /* Validate it */ + if ((Priority > HIGH_PRIORITY) || + (Priority <= LOW_PRIORITY)) + { + /* Fail */ + Status = STATUS_INVALID_PARAMETER; + break; + } + /* Set the priority */ KeSetPriorityThread(&Thread->Tcb, Priority); break; @@ -789,6 +809,25 @@ _SEH_END; if (!NT_SUCCESS(Status)) break; + /* Validate it */ + if ((Priority > THREAD_BASE_PRIORITY_MAX) || + (Priority < THREAD_BASE_PRIORITY_MIN)) + { + /* These ones are OK */ + if ((Priority != THREAD_BASE_PRIORITY_LOWRT + 1) || + (Priority != THREAD_BASE_PRIORITY_IDLE - 1)) + { + /* Check if the process is real time */ + if (PsGetCurrentProcess()->PriorityClass != + PROCESS_PRIORITY_CLASS_REALTIME) + { + /* It isn't, fail */ + Status = STATUS_INVALID_PARAMETER; + break; + } + } + } + /* Set the base priority */ KeSetBasePriorityThread(&Thread->Tcb, Priority); break; @@ -809,11 +848,48 @@ _SEH_END; if (!NT_SUCCESS(Status)) break; + /* Validate it */ + if (!Affinity) + { + /* Fail */ + Status = STATUS_INVALID_PARAMETER; + break; + } + /* Get the process */ Process = Thread->ThreadsProcess; - /* Set the affinity */ - KeSetAffinityThread(&Thread->Tcb, Affinity & Process->Pcb.Affinity); + /* Try to acquire rundown */ + if (ExAcquireRundownProtection(&Process->RundownProtect)) + { + /* Lock it */ + KeEnterCriticalRegion(); + ExAcquirePushLockShared(&Process->ProcessLock); + + /* Combine masks */ + CombinedAffinity = Affinity & Process->Pcb.Affinity; + if (CombinedAffinity != Affinity) + { + /* Fail */ + Status = STATUS_INVALID_PARAMETER; + } + else + { + /* Set the affinity */ + KeSetAffinityThread(&Thread->Tcb, CombinedAffinity); + } + + /* Release the lock and rundown */ + ExReleasePushLockShared(&Process->ProcessLock); + KeLeaveCriticalRegion(); + } + else + { + /* Too late */ + Status = STATUS_PROCESS_IS_TERMINATING; + } + + /* Return status */ break; case ThreadImpersonationToken: @@ -854,6 +930,138 @@ /* Set the address */ Thread->Win32StartAddress = Address; + break; + + case ThreadIdealProcessor: + + /* Use SEH for capture */ + _SEH_TRY + { + /* Get the priority */ + IdealProcessor = *(PULONG_PTR)ThreadInformation; + } + _SEH_HANDLE + { + /* Get the exception code */ + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + if (!NT_SUCCESS(Status)) break; + + /* Validate it */ + if (IdealProcessor > MAXIMUM_PROCESSORS) + { + /* Fail */ + Status = STATUS_INVALID_PARAMETER; + break; + } + + /* Set the ideal */ + Status = KeSetIdealProcessorThread(&Thread->Tcb, + (CCHAR)IdealProcessor); + + /* Get the TEB and protect the thread */ + Teb = Thread->Tcb.Teb; + if ((Teb) && (ExAcquireRundownProtection(&Thread->RundownProtect))) + { + /* Save the ideal processor */ + Teb->IdealProcessor = Thread->Tcb.IdealProcessor; + + /* Release rundown protection */ + ExReleaseRundownProtection(&Thread->RundownProtect); + } + + break; + + case ThreadPriorityBoost: + + /* Use SEH for capture */ + _SEH_TRY + { + /* Get the priority */ + DisableBoost = *(PULONG_PTR)ThreadInformation; + } + _SEH_HANDLE + { + /* Get the exception code */ + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + if (!NT_SUCCESS(Status)) break; + + /* Call the kernel */ + KeSetDisableBoostThread(&Thread->Tcb, (BOOLEAN)DisableBoost); + break; + + case ThreadZeroTlsCell: + + /* Use SEH for capture */ + _SEH_TRY + { + /* Get the priority */ + TlsIndex = *(PULONG_PTR)ThreadInformation; + } + _SEH_HANDLE + { + /* Get the exception code */ + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + if (!NT_SUCCESS(Status)) break; + + /* This is only valid for the current thread */ + if (Thread != PsGetCurrentThread()) + { + /* Fail */ + Status = STATUS_INVALID_PARAMETER; + break; + } + + /* Get the process */ + Process = Thread->ThreadsProcess; + + /* Loop the threads */ + Thread = PsGetNextProcessThread(Process, NULL); + while (Thread) + { + /* Acquire rundown */ + if (ExAcquireRundownProtection(&Thread->RundownProtect)) + { + /* Get the TEB */ + Teb = Thread->Tcb.Teb; + if (Teb) + { + /* Check if we're in the expansion range */ + if (TlsIndex > TLS_MINIMUM_AVAILABLE - 1) + { + if (TlsIndex < (TLS_MINIMUM_AVAILABLE + + TLS_EXPANSION_SLOTS) - 1) + { + /* Check if we have expansion slots */ + ExpansionSlots = Teb->TlsExpansionSlots; + if (ExpansionSlots) + { + /* Clear the index */ + ExpansionSlots[TlsIndex - TLS_MINIMUM_AVAILABLE] = 0; + } + } + } + else + { + /* Clear the index */ + Teb->TlsSlots[TlsIndex] = NULL; + } + } + + /* Release rundown */ + ExReleaseRundownProtection(&Thread->RundownProtect); + } + + /* Go to the next thread */ + Thread = PsGetNextProcessThread(Process, Thread); + } + + /* All done */ break; default: @@ -890,6 +1098,7 @@ PAGED_CODE(); /* Verify Information Class validity */ +#if 0 Status = DefaultQueryInfoBufferCheck(ThreadInformationClass, PsThreadInfoClass, RTL_NUMBER_OF(PsThreadInfoClass), @@ -898,6 +1107,7 @@ ReturnLength, PreviousMode); if (!NT_SUCCESS(Status)) return Status; +#endif /* Check what class this is */ Access = THREAD_QUERY_INFORMATION; Modified: trunk/reactos/regtests/winetests/kernel32/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/regtests/winetests/kernel3…
============================================================================== --- trunk/reactos/regtests/winetests/kernel32/thread.c (original) +++ trunk/reactos/regtests/winetests/kernel32/thread.c Fri Jan 26 01:39:32 2007 @@ -121,7 +121,7 @@ } /* lstrlenA contains an exception handler so this makes sure exceptions work in threads */ - ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" ); + //ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" ); /* Check that noone changed our tls memory */ ok((int)TlsGetValue(tlsIndex)-1==tstruct->threadnum, @@ -185,7 +185,7 @@ DWORD GLE, ret; /* lstrlenA contains an exception handler so this makes sure exceptions work in the main thread */ - ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" ); + //ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" ); /* Retrieve current Thread ID for later comparisons */ curthreadId=GetCurrentThreadId();
17 years, 11 months
1
0
0
0
[ion] 25630: - Implement the balance set manager. Doesn't do much for now except start up the thread queue scanner. - Implement the thread queue scanner, but disable most of it for now, since we're not using the new scheduler.
by ion@svn.reactos.org
Author: ion Date: Thu Jan 25 21:48:56 2007 New Revision: 25630 URL:
http://svn.reactos.org/svn/reactos?rev=25630&view=rev
Log: - Implement the balance set manager. Doesn't do much for now except start up the thread queue scanner. - Implement the thread queue scanner, but disable most of it for now, since we're not using the new scheduler. Added: trunk/reactos/ntoskrnl/ke/balmgr.c Modified: trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/ke/apc.c trunk/reactos/ntoskrnl/mm/mminit.c trunk/reactos/ntoskrnl/mm/mpw.c trunk/reactos/ntoskrnl/ntoskrnl.rbuild Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h Thu Jan 25 21:48:56 2007 @@ -219,6 +219,10 @@ VOID NTAPI +KeBalanceSetManager(IN PVOID Context); + +VOID +NTAPI KiReadyThread(IN PKTHREAD Thread); NTSTATUS 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 (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h Thu Jan 25 21:48:56 2007 @@ -1400,6 +1400,10 @@ NTAPI MmInitMpwThread(VOID); +NTSTATUS +NTAPI +MmInitBsmThread(VOID); + /* pager.c *******************************************************************/ BOOLEAN Modified: trunk/reactos/ntoskrnl/ke/apc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/apc.c?rev=2563…
============================================================================== --- trunk/reactos/ntoskrnl/ke/apc.c (original) +++ trunk/reactos/ntoskrnl/ke/apc.c Thu Jan 25 21:48:56 2007 @@ -212,7 +212,7 @@ { /* We were in a gate wait. FIXME: Handle this */ DPRINT1("Not yet supported -- Report this to Alex\n"); - KEBUGCHECK(0); + while (TRUE); } } else if ((Thread->State == Waiting) && Added: trunk/reactos/ntoskrnl/ke/balmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/balmgr.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ke/balmgr.c (added) +++ trunk/reactos/ntoskrnl/ke/balmgr.c Thu Jan 25 21:48:56 2007 @@ -1,0 +1,207 @@ +/* +* PROJECT: ReactOS Kernel +* LICENSE: GPL - See COPYING in the top level directory +* FILE: ntoskrnl/ke/balmgr.c +* PURPOSE: Balance Set Manager +* PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) +*/ + +/* INCLUDES ******************************************************************/ + +#include <ntoskrnl.h> +#define NDEBUG +#include <debug.h> + +/* GLOBALS *******************************************************************/ + +#define THREAD_BOOST_PRIORITY (LOW_REALTIME_PRIORITY - 1) +ULONG KiReadyScanLast; + +/* PRIVATE FUNCTIONS *********************************************************/ + +VOID +NTAPI +KiScanReadyQueues(IN PKDPC Dpc, + IN PVOID DeferredContext, + IN PVOID SystemArgument1, + IN PVOID SystemArgument2) +{ + PULONG ScanLast = DeferredContext; + ULONG ScanIndex = *ScanLast; + ULONG Count = 10, Number = 16; + PKPRCB Prcb = KiProcessorBlock[ScanIndex]; + ULONG Index = Prcb->QueueIndex; + ULONG WaitLimit = KeTickCount.LowPart - 300; + ULONG Summary; + KIRQL OldIrql; + PLIST_ENTRY ListHead, NextEntry; + PKTHREAD Thread; + + /* Lock the dispatcher and PRCB */ + OldIrql = KiAcquireDispatcherLock(); + KiAcquirePrcbLock(Prcb); +#ifndef NEW_SCHEDULER + goto OldSched; +#endif + + /* Check if there's any thread that need help */ + Summary = Prcb->ReadySummary & ((1 << THREAD_BOOST_PRIORITY) - 2); + if (Summary) + { + /* Start scan loop */ + do + { + /* Normalize the index */ + if (Index > (THREAD_BOOST_PRIORITY - 1)) Index = 1; + + /* Loop for ready threads */ + if (Summary & PRIORITY_MASK(Index)) + { + /* Sanity check */ + ASSERT(!IsListEmpty(&Prcb->DispatcherReadyListHead[Index])); + + /* Update summary and select list */ + Summary ^= PRIORITY_MASK(Index); + ListHead = &Prcb->DispatcherReadyListHead[Index]; + NextEntry = ListHead->Flink; + do + { + /* Select a thread */ + Thread = CONTAINING_RECORD(NextEntry, + KTHREAD, + WaitListEntry); + ASSERT(Thread->Priority == Index); + + /* Check if the thread has been waiting too long */ + if (WaitLimit >= Thread->WaitTime) + { + /* Remove the thread from the queue */ + NextEntry = NextEntry->Blink; + ASSERT((Prcb->ReadySummary & PRIORITY_MASK(Index))); + if (RemoveEntryList(NextEntry->Flink)) + { + /* The list is empty now */ + Prcb->ReadySummary ^= PRIORITY_MASK(Index); + } + + /* Verify priority decrement and set the new one */ + ASSERT((Thread->PriorityDecrement >= 0) && + (Thread->PriorityDecrement <= + Thread->Priority)); + Thread->PriorityDecrement += (THREAD_BOOST_PRIORITY - + Thread->Priority); + ASSERT((Thread->PriorityDecrement >= 0) && + (Thread->PriorityDecrement <= + THREAD_BOOST_PRIORITY)); + + /* Update priority and insert into ready list */ + Thread->Priority = THREAD_BOOST_PRIORITY; + Thread->Quantum = WAIT_QUANTUM_DECREMENT * 4; + KiInsertDeferredReadyList(Thread); + Count --; + } + + /* Go to the next entry */ + NextEntry = NextEntry->Flink; + Number--; + } while((NextEntry != ListHead) && (Number) && (Count)); + } + + /* Increase index */ + Index++; + } while ((Summary) && (Number) && (Count)); + } + + /* Release the locks and dispatcher */ +OldSched: + KiReleasePrcbLock(Prcb); + KiReleaseDispatcherLock(OldIrql); + + /* Update the queue index for next time */ + if ((Count) && (Number)) + { + /* Reset the queue at index 1 */ + Prcb->QueueIndex = 1; + } + else + { + /* Set the index we're in now */ + Prcb->QueueIndex = 0; + } + + /* Increment the CPU number for next time and normalize to CPU count */ + ScanIndex++; + if (ScanIndex == KeNumberProcessors) ScanIndex = 0; + + /* Return the index */ + *ScanLast = ScanIndex; +} + +VOID +NTAPI +KeBalanceSetManager(IN PVOID Context) +{ + KDPC ScanDpc; + KTIMER PeriodTimer; + LARGE_INTEGER DueTime; + KWAIT_BLOCK WaitBlockArray[1]; + PVOID WaitObjects[1]; + NTSTATUS Status; + + /* Set us at a low real-time priority level */ + KeSetPriorityThread(KeGetCurrentThread(), LOW_REALTIME_PRIORITY); + + /* Setup the timer and scanner DPC */ + KeInitializeTimerEx(&PeriodTimer, SynchronizationTimer); + KeInitializeDpc(&ScanDpc, KiScanReadyQueues, &KiReadyScanLast); + + /* Setup the periodic timer */ + DueTime.QuadPart = -1 * 10 * 1000 * 1000; + KeSetTimerEx(&PeriodTimer, DueTime, 1000, &ScanDpc); + + /* Setup the wait objects */ + WaitObjects[0] = &PeriodTimer; + //WaitObjects[1] = MmWorkingSetManagerEvent; // NO WS Management Yet! + + /* Start wait loop */ + do + { + /* Wait on our objects */ + Status = KeWaitForMultipleObjects(1, + WaitObjects, + WaitAny, + Executive, + KernelMode, + FALSE, + NULL, + WaitBlockArray); + switch (Status) + { + /* Check if our timer expired */ + case STATUS_WAIT_0: + + /* Adjust lookaside lists */ + //ExAdjustLookasideDepth(); + + /* Call the working set manager */ + //MmWorkingSetManager(); + + /* FIXME: Outswap stacks */ + + /* Done */ + break; + + /* Check if the working set manager notified us */ + case STATUS_WAIT_1: + + /* Call the working set manager */ + //MmWorkingSetManager(); + break; + + /* Anything else */ + default: + DPRINT1("BALMGR: Illegal wait status, %lx =\n", Status); + break; + } + } while (TRUE); +} Modified: trunk/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mminit.c (original) +++ trunk/reactos/ntoskrnl/mm/mminit.c Thu Jan 25 21:48:56 2007 @@ -482,6 +482,9 @@ */ MmInitMpwThread(); + /* Initialize the balance set manager */ + MmInitBsmThread(); + /* FIXME: Read parameters from memory */ } Modified: trunk/reactos/ntoskrnl/mm/mpw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mpw.c?rev=2563…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mpw.c (original) +++ trunk/reactos/ntoskrnl/mm/mpw.c Thu Jan 25 21:48:56 2007 @@ -123,3 +123,26 @@ return(STATUS_SUCCESS); } + +NTSTATUS +NTAPI +MmInitBsmThread(VOID) +{ + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE ThreadHandle; + + /* Create the thread */ + InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL); + Status = PsCreateSystemThread(&ThreadHandle, + THREAD_ALL_ACCESS, + &ObjectAttributes, + NULL, + NULL, + KeBalanceSetManager, + NULL); + + /* Close the handle and return status */ + ZwClose(ThreadHandle); + return Status; +} Modified: trunk/reactos/ntoskrnl/ntoskrnl.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.rbuild?r…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.rbuild (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.rbuild Thu Jan 25 21:48:56 2007 @@ -47,6 +47,7 @@ </directory> </if> <file>apc.c</file> + <file>balmgr.c</file> <file>bug.c</file> <file>clock.c</file> <file>config.c</file>
17 years, 11 months
1
0
0
0
[ion] 25629: - Use WinXP style /SOS output when enabled. (TODO: Display banner/memory/cpu). - Make more init functions return TRUE/FALSE and bugcheck the system if they failed. - Add more progress bar update calls. - Merge MmInit2 and MmInit3 into MmInitSystem with different phase calls. - Clear KeLoaderBlock after drivers have been loaded. - Update kernel fun. - Update symbolic names of certain strings in ntoskrnl.mc. Use WINDOWS_NT... instead of REACTOS because these names are documented and s
by ion@svn.reactos.org
Author: ion Date: Thu Jan 25 20:51:45 2007 New Revision: 25629 URL:
http://svn.reactos.org/svn/reactos?rev=25629&view=rev
Log: - Use WinXP style /SOS output when enabled. (TODO: Display banner/memory/cpu). - Make more init functions return TRUE/FALSE and bugcheck the system if they failed. - Add more progress bar update calls. - Merge MmInit2 and MmInit3 into MmInitSystem with different phase calls. - Clear KeLoaderBlock after drivers have been loaded. - Update kernel fun. - Update symbolic names of certain strings in ntoskrnl.mc. Use WINDOWS_NT... instead of REACTOS because these names are documented and should be kept for cross-code compatibility. Modified: trunk/reactos/base/system/autochk/autochk.c trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c trunk/reactos/drivers/base/bootvid/vid_vgatext.c trunk/reactos/ntoskrnl/KrnlFun.c trunk/reactos/ntoskrnl/cc/cacheman.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c trunk/reactos/ntoskrnl/include/internal/cc.h trunk/reactos/ntoskrnl/include/internal/fsrtl.h trunk/reactos/ntoskrnl/include/internal/lpc.h trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h trunk/reactos/ntoskrnl/io/iomgr/driver.c trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c trunk/reactos/ntoskrnl/lpc/port.c trunk/reactos/ntoskrnl/mm/mminit.c trunk/reactos/ntoskrnl/ntoskrnl.mc trunk/reactos/subsystems/win32/csrss/csrss.c Modified: trunk/reactos/base/system/autochk/autochk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/autochk/autoch…
============================================================================== --- trunk/reactos/base/system/autochk/autochk.c (original) +++ trunk/reactos/base/system/autochk/autochk.c Thu Jan 25 20:51:45 2007 @@ -306,7 +306,7 @@ } /* Call provider */ - PrintString(" Verifying volume %S\n", DrivePath); + //PrintString(" Verifying volume %S\n", DrivePath); RtlInitUnicodeString(&DrivePathU, DrivePath); Status = ChkdskFunc(&DrivePathU, TRUE, // FixErrors @@ -364,7 +364,7 @@ CheckVolume(DrivePath); } } - PrintString(" Done\n\n"); + //PrintString(" Done\n\n"); return 0; } Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Thu Jan 25 20:51:45 2007 @@ -926,13 +926,13 @@ * Load boot drivers */ FrLdrLoadBootDrivers(szBootPath, 40); - UiUnInitialize("Booting ReactOS..."); + //UiUnInitialize("Booting ReactOS..."); /* * Now boot the kernel */ DiskStopFloppyMotor(); - MachVideoPrepareForReactOS(); + //MachVideoPrepareForReactOS(); FrLdrStartup(0x2badb002); } Modified: trunk/reactos/drivers/base/bootvid/vid_vgatext.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/vid_v…
============================================================================== --- trunk/reactos/drivers/base/bootvid/vid_vgatext.c (original) +++ trunk/reactos/drivers/base/bootvid/vid_vgatext.c Thu Jan 25 20:51:45 2007 @@ -48,7 +48,7 @@ #define CRTC_CURLO 0x0f #define CHAR_ATTRIBUTE_BLACK 0x00 /* black on black */ -#define CHAR_ATTRIBUTE 0x1F /* grey on blue */ +#define CHAR_ATTRIBUTE 0x07 /* grey on blue */ /* GLOBALS *******************************************************************/ @@ -65,7 +65,7 @@ ULONG i; for (i = 0; i < SizeX * SizeY; i++, ptr++) - *ptr = (0x1700 + ' '); + *ptr = (0x0000 + ' '); } static BOOLEAN NTAPI Modified: trunk/reactos/ntoskrnl/KrnlFun.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/KrnlFun.c (original) +++ trunk/reactos/ntoskrnl/KrnlFun.c Thu Jan 25 20:51:45 2007 @@ -12,27 +12,26 @@ // - Use APC and DPC Interrupt Dispatchers. // - CMOS Initialization and CMOS Spinlock. // -// Fstub: -// - Implement IoAssignDriveLetters using mount manager support. -// -// Kd: -// - Implement KD Kernel Debugging and WinDBG support. +// Global: +// - TODO: Complete the list of bufxies +// - Fix process reference count leak. +// - Fix atapi.sys loading one more time at each boot. +// - Fix LiveCD. // /////////////////////////////////////////////////////////////////////////////// // REACTOS GUIDANCE PLAN // ________________________________________________________________________________________________________ // / \ -// | OB, PS, LPC, DBGK, EX => "Code complete". No expected changes until 0.5.0 | | +// | OB, PS, LPC, DBGK, EX, INIT => "Code complete". No expected changes until 0.5.0 | | // | SE => Not looked at. Interaction with Ps/Io is minimal and currently hacked away. Preserve. |J| -// | INIT => Boot sequence still needs work in terms of interaction with Ke and CPU features. |A| -// | KD/KDBG => Laptop has special version of ROS without these components. Commit in branch. |N| -// | HAL => Needs APC/DPC/IRQL implementation fixed ASAP in terms of interaction with Ke. | | +// | KD/KDBG => Laptop has special version of ROS without these components. Commit in branch. |A| +// | HAL => Needs APC/DPC/IRQL implementation fixed ASAP in terms of interaction with Ke. |N| // | || || || || || || || || || || || || | | // | \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ |F| -// | KE => Enable new thread scheduler and ensure it works. |E| -// | KD => Implement KD64 6.0, compatible with WinDBG |B| -// | FSTUB => Needs IoAssignDriveLetters fixed ASAP but not critical to Ke/Ex. Interacts with Io. | | +// | BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES BUGFIXES |E| +// | KE => Enable new thread scheduler and ensure it works. |B| +// | KD => Implement KD64 6.0, compatible with WinDBG | | // | || || || || || || || || || || || || |M| // | \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ |A| // | CM => TOTAL REWRITE. |R| Modified: trunk/reactos/ntoskrnl/cc/cacheman.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/cacheman.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/cc/cacheman.c (original) +++ trunk/reactos/ntoskrnl/cc/cacheman.c Thu Jan 25 20:51:45 2007 @@ -16,11 +16,12 @@ /* FUNCTIONS *****************************************************************/ -VOID +BOOLEAN NTAPI CcInitializeCacheManager(VOID) { - CcInitView(); + CcInitView(); + return TRUE; } /* Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c (original) +++ trunk/reactos/ntoskrnl/ex/init.c Thu Jan 25 20:51:45 2007 @@ -312,42 +312,6 @@ /* Copy the table into the system process and set this as the base */ RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize); ExpNlsTableBase = SectionBase; -} - -VOID -INIT_FUNCTION -ExpDisplayNotice(VOID) -{ - CHAR str[50]; - - if (ExpInTextModeSetup) - { - HalDisplayString( - "\n\n\n ReactOS " KERNEL_VERSION_STR " Setup \n"); - HalDisplayString( - " \xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD"); - HalDisplayString( - "\xCD\xCD\n"); - return; - } - - HalDisplayString("Starting ReactOS "KERNEL_VERSION_STR" (Build " - KERNEL_VERSION_BUILD_STR")\n"); - HalDisplayString(RES_STR_LEGAL_COPYRIGHT); - HalDisplayString("\n\nReactOS is free software, covered by the GNU General " - "Public License, and you\n"); - HalDisplayString("are welcome to change it and/or distribute copies of it " - "under certain\n"); - HalDisplayString("conditions. There is absolutely no warranty for " - "ReactOS.\n\n"); - - /* Display number of Processors */ - sprintf(str, - "Found %x system processor(s). [%lu MB Memory]\n", - (int)KeNumberProcessors, - (MmFreeLdrMemHigher + 1088)/ 1024); - HalDisplayString(str); - } NTSTATUS @@ -1083,6 +1047,8 @@ InitWinPEModeType |= (strstr(CommandLine, "INRAM")) ? 0x80000000 : 1; } + /* FIXME: Print product name, version, and build */ + /* Initialize Power Subsystem in Phase 0 */ if (!PoInitSystem(0, AcpiTableDetected)) KeBugCheck(INTERNAL_POWER_ERROR); @@ -1127,6 +1093,11 @@ /* Initialize all processors */ if (!HalAllProcessorsStarted()) KeBugCheck(HAL1_INITIALIZATION_FAILED); + /* FIXME: Print CPU and Memory */ + + /* Update the progress bar */ + InbvUpdateProgressBar(5); + /* Call OB initialization again */ if (!ObInit()) KeBugCheck(OBJECT1_INITIALIZATION_FAILED); @@ -1158,53 +1129,77 @@ } /* Set up Region Maps, Sections and the Paging File */ - MmInit2(); + if (!MmInitSystem(1, LoaderBlock)) KeBugCheck(MEMORY1_INITIALIZATION_FAILED); /* Create NLS section */ ExpInitNls(KeLoaderBlock); /* Initialize Cache Views */ - CcInitializeCacheManager(); + if (!CcInitializeCacheManager()) KeBugCheck(CACHE_INITIALIZATION_FAILED); /* Initialize the Registry */ if (!CmInitSystem1()) KeBugCheck(CONFIG_INITIALIZATION_FAILED); + /* Update progress bar */ + InbvUpdateProgressBar(15); + /* Update timezone information */ ExRefreshTimeZoneInformation(&SystemBootTime); /* Initialize the File System Runtime Library */ - FsRtlInitSystem(); + if (!FsRtlInitSystem()) KeBugCheck(FILE_INITIALIZATION_FAILED); /* Report all resources used by HAL */ HalReportResourceUsage(); + /* Call the debugger DLL once we have KD64 6.0 support */ + //KdDebuggerInitialize1(LoaderBlock); + + /* Setup PnP Manager in phase 1 */ + if (!PpInitSystem()) KeBugCheck(PP1_INITIALIZATION_FAILED); + + /* Update progress bar */ + InbvUpdateProgressBar(20); + /* Initialize LPC */ - LpcpInitSystem(); - - /* Enter the kernel debugger before starting up the boot drivers */ - if (KdDebuggerEnabled && KdpEarlyBreak) DbgBreakPoint(); + if (!LpcInitSystem()) KeBugCheck(LPC_INITIALIZATION_FAILED); /* Initialize the I/O Subsystem */ if (!IoInitSystem(KeLoaderBlock)) KeBugCheck(IO1_INITIALIZATION_FAILED); /* Unmap Low memory, and initialize the MPW and Balancer Thread */ - MmInit3(); -#if DBG - extern ULONG Guard; -#endif - ASSERT(Guard == 0xCACA1234); + MmInitSystem(2, LoaderBlock); + + /* Update progress bar */ + InbvUpdateProgressBar(80); /* Initialize VDM support */ KeI386VdmInitialize(); /* Initialize Power Subsystem in Phase 1*/ - PoInitSystem(1, AcpiTableDetected); + if (!PoInitSystem(1, AcpiTableDetected)) KeBugCheck(INTERNAL_POWER_ERROR); /* Initialize the Process Manager at Phase 1 */ if (!PsInitSystem(LoaderBlock)) KeBugCheck(PROCESS1_INITIALIZATION_FAILED); + /* Update progress bar */ + InbvUpdateProgressBar(85); + + /* Make sure nobody touches the loader block again */ + if (LoaderBlock == KeLoaderBlock) KeLoaderBlock = NULL; + LoaderBlock = Context = NULL; + + /* Update progress bar */ + InbvUpdateProgressBar(90); + /* Launch initial process */ Status = ExpLoadInitialProcess(ProcessInfo); + + /* Update progress bar */ + InbvUpdateProgressBar(100); + + /* Allow strings to be displayed */ + InbvEnableDisplayString(TRUE); /* Wait 5 seconds for it to initialize */ Timeout.QuadPart = Int32x32To64(5, -10000000); Modified: trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c (original) +++ trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c Thu Jan 25 20:51:45 2007 @@ -153,7 +153,7 @@ /* PRIVATE FUNCTIONS *********************************************************/ -VOID +BOOLEAN NTAPI FsRtlInitSystem(VOID) { @@ -179,6 +179,8 @@ { ExInitializeResource(&FsRtlPagingIoResources[i]); } + + return TRUE; } /* PUBLIC FUNCTIONS **********************************************************/ Modified: trunk/reactos/ntoskrnl/include/internal/cc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/cc.h (original) +++ trunk/reactos/ntoskrnl/include/internal/cc.h Thu Jan 25 20:51:45 2007 @@ -110,7 +110,7 @@ NTAPI WriteCacheSegment(PCACHE_SEGMENT CacheSeg); -VOID +BOOLEAN NTAPI CcInitializeCacheManager(VOID); Modified: trunk/reactos/ntoskrnl/include/internal/fsrtl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/fsrtl.h (original) +++ trunk/reactos/ntoskrnl/include/internal/fsrtl.h Thu Jan 25 20:51:45 2007 @@ -47,7 +47,7 @@ // // Initialization Routines // -VOID +BOOLEAN NTAPI FsRtlInitSystem( VOID Modified: trunk/reactos/ntoskrnl/include/internal/lpc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/lpc.h (original) +++ trunk/reactos/ntoskrnl/include/internal/lpc.h Thu Jan 25 20:51:45 2007 @@ -117,9 +117,9 @@ // // Initialization functions // -NTSTATUS +BOOLEAN NTAPI -LpcpInitSystem( +LpcInitSystem( VOID ); 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 (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h Thu Jan 25 20:51:45 2007 @@ -550,13 +550,10 @@ ULONG MaxMemInMeg ); -VOID -NTAPI -MmInit2(VOID); - -VOID -NTAPI -MmInit3(VOID); +BOOLEAN +NTAPI +MmInitSystem(IN ULONG Phase, + IN PLOADER_PARAMETER_BLOCK LoaderBlock); VOID NTAPI Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Thu Jan 25 20:51:45 2007 @@ -66,7 +66,6 @@ /* * Initalization functions (called once by main()) */ -VOID MmInitSystem(ULONG Phase, PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress); BOOLEAN NTAPI ObInit(VOID); BOOLEAN NTAPI CmInitSystem1(VOID); VOID CmShutdownRegistry(VOID); Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/driver.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/driver.c Thu Jan 25 20:51:45 2007 @@ -280,14 +280,30 @@ BOOLEAN Unicode) { CHAR TextBuffer[256]; + PCHAR Extra = ".sys"; + if (ExpInTextModeSetup) return; - if (Unicode) - { - sprintf(TextBuffer, "Loading %S...\n", (PWCHAR)ServiceName); + if (Unicode) + { + if (wcsstr(ServiceName, L".sys")) Extra = ""; + sprintf(TextBuffer, + "%s%s%s\\%S%s\n", + KeLoaderBlock->ArcBootDeviceName, + KeLoaderBlock->NtBootPathName, + "System32\\Drivers", + (PWCHAR)ServiceName, + Extra); } else { - sprintf(TextBuffer, "Loading %s...\n", (PCHAR)ServiceName); + if (strstr(ServiceName, ".sys")) Extra = ""; + sprintf(TextBuffer, + "%s%s%s\\%s%s\n", + KeLoaderBlock->ArcBootDeviceName, + KeLoaderBlock->NtBootPathName, + "System32\\Drivers", + (PCHAR)ServiceName, + Extra); } HalDisplayString(TextBuffer); } Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Thu Jan 25 20:51:45 2007 @@ -3398,7 +3398,7 @@ case 1: /* Do Phase 1 */ - return FALSE; + return TRUE; //return PiInitPhase1(); default: Modified: trunk/reactos/ntoskrnl/lpc/port.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/port.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/port.c (original) +++ trunk/reactos/ntoskrnl/lpc/port.c Thu Jan 25 20:51:45 2007 @@ -31,10 +31,9 @@ /* PRIVATE FUNCTIONS *********************************************************/ -NTSTATUS -INIT_FUNCTION +BOOLEAN NTAPI -LpcpInitSystem(VOID) +LpcInitSystem(VOID) { OBJECT_TYPE_INITIALIZER ObjectTypeInitializer; UNICODE_STRING Name; @@ -70,7 +69,7 @@ 32); /* We're done */ - return STATUS_SUCCESS; + return TRUE; } /* PUBLIC FUNCTIONS **********************************************************/ Modified: trunk/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mminit.c (original) +++ trunk/reactos/ntoskrnl/mm/mminit.c Thu Jan 25 20:51:45 2007 @@ -453,44 +453,39 @@ BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady; -VOID +BOOLEAN NTAPI -INIT_FUNCTION -MmInit2(VOID) -{ - MmInitializeRmapList(); - RmapReady = TRUE; - MmInitializePageOp(); - PageOpReady = TRUE; - MmInitSectionImplementation(); - SectionsReady = TRUE; - MmInitPagingFile(); - PagingReady = TRUE; -} - -VOID -INIT_FUNCTION -NTAPI -MmInit3(VOID) -{ - /* - * Unmap low memory - */ -#ifdef CONFIG_SMP - /* In SMP mode we can unmap the low memory - if all processors are started. */ - MmDeletePageTable(NULL, 0); -#endif - - MmCreatePhysicalMemorySection(); - MiInitBalancerThread(); - - /* - * Initialise the modified page writer. - */ - MmInitMpwThread(); - - /* FIXME: Read parameters from memory */ +MmInitSystem(IN ULONG Phase, + IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ + if (Phase == 1) + { + MmInitializeRmapList(); + RmapReady = TRUE; + MmInitializePageOp(); + PageOpReady = TRUE; + MmInitSectionImplementation(); + SectionsReady = TRUE; + MmInitPagingFile(); + PagingReady = TRUE; + } + else if (Phase == 2) + { + /* + * Unmap low memory + */ + MmCreatePhysicalMemorySection(); + MiInitBalancerThread(); + + /* + * Initialise the modified page writer. + */ + MmInitMpwThread(); + + /* FIXME: Read parameters from memory */ + } + + return TRUE; } VOID static Modified: trunk/reactos/ntoskrnl/ntoskrnl.mc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.mc?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.mc (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.mc Thu Jan 25 20:51:45 2007 @@ -1089,6 +1089,14 @@ PP0_INITIALIZATION_FAILED . +MessageId=0x90 +Severity=Success +Facility=System +SymbolicName=PP1_INITIALIZATION_FAILED +Language=English +PP1_INITIALIZATION_FAILED +. + MessageId=0x94 Severity=Success Facility=System @@ -1300,42 +1308,42 @@ IMPERSONATING_WORKER_THREAD . -MessageId=0x9A +MessageId=0x7E Severity=Informational Facility=System -SymbolicName=REACTOS_BANNER -Language=English -ReactOS Version %s (Build %s) -. - -MessageId=0x9B +SymbolicName=WINDOWS_NT_BANNER +Language=English +ReactOS (R) Version %hs (Build %u%hs) +. + +MessageId=0x87 Severity=Informational Facility=System -SymbolicName=REACTOS_SERVICE_PACK +SymbolicName=WINDOWS_NT_CSD_STRING Language=English Service Pack . -MessageId=0x9C +MessageId=0x88 Severity=Informational Facility=System -SymbolicName=REACTOS_INFO_STRING_UNI_PROCESSOR +SymbolicName=WINDOWS_NT_INFO_STRING Language=English %u System Processor [%u MB Memory] %Z +. + +MessageId=0x89 +Severity=Informational +Facility=System +SymbolicName=WINDOWS_NT_MP_STRING +Language=English +MulitProcessor Kernel . MessageId=0x9D Severity=Informational Facility=System -SymbolicName=REACTOS_MP_KERNEL -Language=English -MulitProcessor Kernel -. - -MessageId=0x9E -Severity=Informational -Facility=System -SymbolicName=REACTOS_INFO_STRING_MULTI_PROCESSOR +SymbolicName=WINDOWS_NT_INFO_STRING_PLURAL Language=English %u System Processors [%u MB Memory] %Z . Modified: trunk/reactos/subsystems/win32/csrss/csrss.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/csrss.c (original) +++ trunk/reactos/subsystems/win32/csrss/csrss.c Thu Jan 25 20:51:45 2007 @@ -36,8 +36,8 @@ { NTSTATUS Status = STATUS_SUCCESS; - PrintString("ReactOS Client/Server Run-Time (Build %s)\n", - KERNEL_VERSION_BUILD_STR); + //PrintString("ReactOS Client/Server Run-Time (Build %s)\n", + //KERNEL_VERSION_BUILD_STR); /*================================================================== * Initialize the Win32 environment subsystem server.
17 years, 11 months
1
0
0
0
[spetreolle] 25628: compile intl_new using its includes, not intl's ones
by spetreolle@svn.reactos.org
Author: spetreolle Date: Thu Jan 25 18:06:10 2007 New Revision: 25628 URL:
http://svn.reactos.org/svn/reactos?rev=25628&view=rev
Log: compile intl_new using its includes, not intl's ones Modified: trunk/reactos/dll/cpl/intl_new/intl.rbuild Modified: trunk/reactos/dll/cpl/intl_new/intl.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/intl.rbui…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/intl.rbuild (original) +++ trunk/reactos/dll/cpl/intl_new/intl.rbuild Thu Jan 25 18:06:10 2007 @@ -1,6 +1,6 @@ <module name="intl_new" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_INTL}" installbase="system32" installname="intl_new.cpl" usewrc="false"> <importlibrary definition="intl.def" /> - <include base="intl">.</include> + <include base="intl_new">.</include> <define name="UNICODE" /> <define name="_UNICODE" /> <define name="__REACTOS__" />
17 years, 11 months
1
0
0
0
[greatlrd] 25627: revers r25623 Acdring to Sylvain Petreolle, spetreolle at yahoo.fr this is copy paste from windows xp cpl, it is not allown todo a copy paste of sentence from windows xp, he did compare it.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Thu Jan 25 13:15:19 2007 New Revision: 25627 URL:
http://svn.reactos.org/svn/reactos?rev=25627&view=rev
Log: revers r25623 Acdring to Sylvain Petreolle, spetreolle at yahoo.fr this is copy paste from windows xp cpl, it is not allown todo a copy paste of sentence from windows xp, he did compare it. Modified: trunk/reactos/dll/cpl/intl_new/Fr.rc (contents, props changed) Modified: trunk/reactos/dll/cpl/intl_new/Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/Fr.rc?rev…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/Fr.rc (original) +++ trunk/reactos/dll/cpl/intl_new/Fr.rc Thu Jan 25 13:15:19 2007 @@ -5,40 +5,40 @@ CAPTION "Options régionales" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Standards et formats", IDC_GROUPBOX, 5, 3, 242, 165 - LTEXT "Cette option modifie la façon dont certains programmes affichent les nombres, les monnaies, les dates et les heures.", IDC_STATIC, 14, 15, 230, 16 - LTEXT "Sélectionnez un élément pour afficher ses paramètres ou cliquez sur Personnaliser pour choisir vos propres formats :", IDC_STATIC, 14, 36, 230, 16 + GROUPBOX "Options régionales et standards", IDC_GROUPBOX, 5, 3, 242, 165 + LTEXT "Cette option influence la façon d'affichage par les programmes des nombres, des devises, des dates et de l'heure.", IDC_STATIC, 14, 15, 230, 16 + LTEXT "&Choisir un élément de la liste ou presser le bouton ""Pa&ramétrer"" pour modifier séparément les formats:", IDC_STATIC, 14, 36, 230, 16 COMBOBOX IDC_SETREG_COMBO, 14, 54, 168, 120, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT - PUSHBUTTON "Personnaliser...", IDC_SETUP_BUTTON, 187, 54, 52, 13 + PUSHBUTTON "Pa&ramétrer...", IDC_SETUP_BUTTON, 187, 54, 52, 13 LTEXT "Exemples", IDC_STATIC, 14, 73, 70, 10 - LTEXT "Nombre :", IDC_STATIC, 16, 86, 48, 10 - LTEXT "Symbole monétaire :", IDC_STATIC, 16, 101, 48, 10 - LTEXT "Heure :", IDC_STATIC, 16, 116, 48, 10 - LTEXT "Date courte :", IDC_STATIC, 16, 131, 48, 10 - LTEXT "Date longue :", IDC_STATIC, 16, 146, 48, 10 + LTEXT "Nombre:", IDC_STATIC, 16, 86, 48, 10 + LTEXT "Monétaire:", IDC_STATIC, 16, 101, 48, 10 + LTEXT "Heure:", IDC_STATIC, 16, 116, 48, 10 + LTEXT "Date courte:", IDC_STATIC, 16, 131, 48, 10 + LTEXT "Date longue:", IDC_STATIC, 16, 146, 48, 10 EDITTEXT IDC_NUMSAMPLE_EDIT, 69, 86, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_MONEYSAMPLE_EDIT, 69, 101, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_TIMESAMPLE_EDIT, 69, 116, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_SHORTTIMESAMPLE_EDIT, 69, 131, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_FULLTIMESAMPLE_EDIT, 69, 146, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - GROUPBOX "Emplacement", IDC_GROUPBOX, 5, 172, 242, 56 - LTEXT "Pour aider les services à vous fournir des informations telles que les actualités et la météo, sélectionnez votre emplacement actuel :" , IDC_STATIC, 14, 184, 225, 24 + GROUPBOX "Position géographique", IDC_GROUPBOX, 5, 172, 242, 56 + LTEXT "Sélectionner votre position géographique pour les services tels que les infos locales ou la météo" , IDC_STATIC, 14, 184, 225, 24 COMBOBOX IDC_LOCATION_COMBO, 14, 211, 225, 40, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT END IDD_EXTRAOPTSPAGE DIALOGEX 0, 0, 252, 236 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Options avancées" +CAPTION "Extra" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Langue pour les programmes non Unicode", IDC_GROUPBOX, 5, 5, 242, 90 + GROUPBOX "Program language that not unicode supported", IDC_GROUPBOX, 5, 5, 242, 90 COMBOBOX IDC_LANGUAGE_COMBO, 14, 75, 225, 60, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Ce paramètre système permet à des programmes non Unicode d'afficher des dialogues et des menus dans leur langue d'origine. Ce paramètre n'affecte pas les programmes Unicode mais s'applique à tous les utilisateurs de cet ordinateur.", IDC_STATIC, 14, 18, 223, 33 - LTEXT "Sélectionnez une langue qui corresponde à la version des programmes non Unicode que vous voulez utiliser :", IDC_STATIC, 14, 55, 223, 18 - GROUPBOX "Tables de conversion des pages de code", IDC_GROUPBOX, 5, 101, 242, 88 + LTEXT "This option...", IDC_STATIC, 14, 18, 223, 33 + LTEXT "Sélectionner la langue...", IDC_STATIC, 14, 55, 223, 18 + GROUPBOX "Transformation tables codepages", IDC_GROUPBOX, 5, 101, 242, 88 /* TODO: add other components*/ END @@ -47,10 +47,10 @@ CAPTION "Langues" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Services de texte et langues d'entrée", IDC_GROUPBOX, 5, 3, 242, 52 - LTEXT "Pour afficher ou modifier les langues et les méthodes que vous pouvez utiliser pour entrer du texte, cliquer sur Détails.", -1, 12, 13, 230, 18 - PUSHBUTTON "Détails...", IDC_DETAIL_BUTTON, 186, 34, 54, 14 - GROUPBOX "Prise en charge de langues supplémentaires", IDC_GROUPBOX, 5, 60, 242, 82 + GROUPBOX "Langue de saisie du texte et services", IDC_GROUPBOX, 5, 3, 242, 52 + LTEXT "Pour voir ou modifier les langues et les méthodes de saisie de texte, cliquer sur ""Détail...""", -1, 12, 13, 230, 18 + PUSHBUTTON "Dé&tail...", IDC_DETAIL_BUTTON, 186, 34, 54, 14 + GROUPBOX "Support de langages additionnels", IDC_GROUPBOX, 5, 60, 242, 82 /* TODO: add other components*/ END @@ -59,62 +59,62 @@ CAPTION "Nombres" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Aperçu", IDC_GROUPBOX, 5, 7, 242, 48 - LTEXT "Positif :", -1, 11, 20, 28, 10 + GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 48 + LTEXT "Positif:", -1, 11, 20, 28, 10 EDITTEXT IDC_NUM_EDIT, 42, 18, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Négatif :", -1, 128, 20, 31, 10 + LTEXT "Négatif:", -1, 128, 20, 31, 10 EDITTEXT IDC_NEGNUM_EDIT, 162, 18, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Positif :", -1, 11, 38, 28, 10 + LTEXT "Positif:", -1, 11, 38, 28, 10 EDITTEXT IDC_NUM1_EDIT, 42, 36, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Négatif :", -1, 128, 38, 31, 10 + LTEXT "Négatif:", -1, 128, 38, 31, 10 EDITTEXT IDC_NEGNUM1_EDIT, 162, 36, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Symbole décimal :", -1, 18, 61, 126, 9 + LTEXT "Séparateur décimal:", -1, 18, 61, 126, 9 COMBOBOX IDC_NUMDECIMALSEP_COMBO, 147, 59, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Nombre de décimales :", -1, 18, 77, 126, 9 + LTEXT "Nombre de chiffres décimaux:", -1, 18, 77, 126, 9 COMBOBOX IDC_NUMFRACSYBMS_COMBO, 147, 75, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Symbole de groupement des chiffres :", -1, 18, 93, 126, 9 + LTEXT "Séparateur de champ:", -1, 18, 93, 126, 9 COMBOBOX IDC_NUMFIELDSEP_COMBO, 147, 91, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Groupement des chiffres :", -1, 18, 109, 126, 9 + LTEXT "Nombre de chiffres dans le champ:", -1, 18, 109, 126, 9 COMBOBOX IDC_NUMDIGFIELD_COMBO, 147, 107, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Symbole du signe négatif :", -1, 18, 125, 126, 9 + LTEXT "Signe de nombre négatif:", -1, 18, 125, 126, 9 COMBOBOX IDC_NUMNEGSIGN_COMBO, 147, 123, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Format de nombre négatif :", -1, 18, 141, 126, 9 + LTEXT "Format des nombres négatifs:", -1, 18, 141, 126, 9 COMBOBOX IDC_NUMNEGFMT_COMBO, 147, 139, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Afficher les zéros en en-tête :", -1, 18, 157, 126, 9 + LTEXT "Zéros d'en-tête:", -1, 18, 157, 126, 9 COMBOBOX IDC_NUMLEADZERO_COMBO, 147, 155, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Séparateur de listes :", -1, 18, 173, 126, 9 + LTEXT "Séparateur d'éléments de liste :", -1, 18, 173, 126, 9 COMBOBOX IDC_NUMELEMLISTSEP_COMBO, 147, 171, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Système de mesure:", -1, 18, 189, 126, 9 + LTEXT "Unité de mesure:", -1, 18, 189, 126, 9 COMBOBOX IDC_NUMUNITSSYS_COMBO, 147, 187, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Chiffres correspondants à la région :", -1, 18, 205, 126, 9 + LTEXT "Region corresponding digits:", -1, 18, 205, 126, 9 COMBOBOX IDC_NUMREGDIG_COMBO, 147, 203, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Remplacement de chiffres :", -1, 18, 221, 126, 9 + LTEXT "Digit replacement:", -1, 18, 221, 126, 9 COMBOBOX IDC_NUMDIGREPL_COMBO, 147, 219, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END IDD_CURRENCYOPTSSETUP DIALOGEX 0, 0, 252, 236 STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Symbole monétaire" +CAPTION "Monnaie" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 40 - LTEXT "Positif :", -1, 10, 25, 30, 10 + LTEXT "Positif:", -1, 10, 25, 30, 10 EDITTEXT IDC_CURRENCY_EDIT, 42, 23, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Négatif :", -1, 128, 25, 31, 10 + LTEXT "Négatif:", -1, 128, 25, 31, 10 EDITTEXT IDC_NEGCURRENCY_EDIT, 162, 23, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Symbole monétaire :", -1, 20, 61, 126, 9 + LTEXT "Symbole monétaire:", -1, 20, 61, 126, 9 COMBOBOX IDC_CURRENCYUNIT_COMBO, 148, 59, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Format positif :", -1, 20, 78, 126, 9 + LTEXT "Monnaie au format négatif:", -1, 20, 78, 126, 9 COMBOBOX IDC_POSCURRENCYSUM_COMBO, 148, 76, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Format négatif :", -1, 20, 95, 126, 9 + LTEXT "Monnaie au format positif:", -1, 20, 95, 126, 9 COMBOBOX IDC_NEGCURRENCYSUM_COMBO, 148, 93, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Symbole décimal :", -1, 20, 121, 126, 9 + LTEXT "Séparateur décimal:", -1, 20, 121, 126, 9 COMBOBOX IDC_WHOLEFRACTSEP_COMBO, 148, 119, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Nombre de décimales :", -1, 20, 137, 126, 9 + LTEXT "Nombre de chiffres décimaux:", -1, 20, 137, 126, 9 COMBOBOX IDC_FRACSYMBSNUM_COMBO, 148, 136, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Symbole de groupement des chiffres :", -1, 20, 166, 126, 9 + LTEXT "Séparateur de champ:", -1, 20, 166, 126, 9 COMBOBOX IDC_FIELDSEP_COMBO, 148, 164, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Groupement des chiffres :", -1, 20, 183, 126, 9 + LTEXT "Nombre de chiffres dans le champ:", -1, 20, 183, 126, 9 COMBOBOX IDC_DIGINFIELDNUM_COMBO, 148, 181, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END @@ -123,20 +123,20 @@ CAPTION "Heure" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Aperçu", IDC_GROUPBOX, 5, 7, 242, 33 - LTEXT "Exemple d'heure :", -1, 13, 21, 52, 10 + GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 33 + LTEXT "Exemple:", -1, 13, 21, 52, 10 EDITTEXT IDC_TIME_EDIT, 68, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_UNKNOWN_EDIT, 156, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Format de l'heure :", -1, 10, 52, 147, 10 + LTEXT "Format de l'heure:", -1, 10, 52, 147, 10 COMBOBOX IDC_TIMEFMT_COMBO, 161, 50, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Séparateur horaire :", -1, 10, 69, 147, 10 + LTEXT "Séparateur horaire:", -1, 10, 69, 147, 10 COMBOBOX IDC_TIMESEP_COMBO, 161, 67, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Symbole AM :", -1, 10, 86, 147, 10 + LTEXT "Heure avant midi (AM):", -1, 10, 86, 147, 10 COMBOBOX IDC_TIMEAM_COMBO, 161, 84, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Symbole PM :", -1, 10, 104, 147, 10 + LTEXT "Heure après midi (PM):", -1, 10, 104, 147, 10 COMBOBOX IDC_TIMEPM_COMBO, 161, 102, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE GROUPBOX "", IDC_GROUPBOX, 7, 132, 238, 80 - LTEXT "Notation du format de l'heure\nh = heure m = minute s = seconde t = matin ou après-midi\n\nh = 12 heures\nH = 24 heures\n\nhh, mm, ss = précédé d'un zéro\nh, m, s = pas de zéro", -1, 13, 141, 226, 65 + LTEXT "Description du format de l'heure\nh = heure m = minute s = seconde t = matin ou après-midi\n\nh = heure au format 12 heures\nH = heure au format 24 heures\n\nhh, mm, ss = avec des zéros\nh, m, s = sans zéros", -1, 13, 141, 226, 65 END IDD_DATEOPTSSETUP DIALOGEX 0, 0, 252, 236 @@ -145,37 +145,37 @@ FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Calendrier", IDC_GROUPBOX, 5, 7, 242, 74 - LTEXT "Quand une année à deux chiffres est entrée, l'interpréter comme une année comprise entre :", -1, 13, 18, 225, 8 + LTEXT "Si l'année est saisie sur 2 chiffres, l'afficher en tant qu'année entre:", -1, 13, 18, 225, 8 EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP LTEXT "et", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 - LTEXT "Calendrier :", -1, 13, 48, 56, 10 + LTEXT "Calendrier:", -1, 13, 48, 56, 10 COMBOBOX IDC_CALTYPE_COMBO, 77, 46, 161, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT | WS_DISABLED - LTEXT "Chronologie d'Hijra :", -1, 13, 59, 60, 16 + LTEXT "Chronology by Hijra:", -1, 13, 59, 60, 16 COMBOBOX IDC_HIJCHRON_COMBO, 77, 64, 161, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT | WS_DISABLED - GROUPBOX "Date courte", IDC_GROUPBOX, 7, 83, 238, 81 - LTEXT "Exemple de date courte :", -1, 13, 95, 63, 10 + GROUPBOX "Format court", IDC_GROUPBOX, 7, 83, 238, 81 + LTEXT "Exemple:", -1, 13, 95, 63, 10 EDITTEXT IDC_SHRTDATESAMPLE_EDIT, 77, 93, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Exemple de lecture de droite à gauche:", -1, 13, 109, 60, 16 + LTEXT "Exemple - lecture de droite à gauche:", -1, 13, 109, 60, 16 EDITTEXT IDC_SHRTDATERTOL_EDIT, 77, 111, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED - LTEXT "Format de date courte :", -1, 13, 131, 60, 10 + LTEXT "Format court:", -1, 13, 131, 60, 10 COMBOBOX IDC_SHRTDATEFMT_COMBO, 77, 129, 161, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Séparateur de date :", -1, 13, 148, 113, 10 + LTEXT "Séparateur de date:", -1, 13, 148, 113, 10 COMBOBOX IDC_SHRTDATESEP_COMBO, 187, 146, 51, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - GROUPBOX "Date longue", IDC_GROUPBOX, 7, 167, 238, 64 - LTEXT "Exemple de date longue :", -1, 13, 179, 61, 10 + GROUPBOX "Format long:", IDC_GROUPBOX, 7, 167, 238, 64 + LTEXT "Exemple:", -1, 13, 179, 61, 10 EDITTEXT IDC_LONGDATESAMPLE_EDIT, 77, 177, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Exemple de lecture de gauche à droite:", -1, 13, 193, 61, 16 + LTEXT "Exemple - lecture de gauche à droite:", -1, 13, 193, 61, 16 EDITTEXT IDC_LONGDATERTOL_EDIT, 77, 195, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED - LTEXT "Format de date longue :", -1, 13, 215, 60, 10 + LTEXT "Format long:", -1, 13, 215, 60, 10 COMBOBOX IDC_LONGDATEFMT_COMBO, 77, 213, 161, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END STRINGTABLE BEGIN - IDS_CPLNAME "Options régionales et linguistiques" - IDS_CPLDESCRIPTION "Personnaliser les paramètres d'affichage des langues, des nombres, de l'heure et des dates." + IDS_CPLNAME "Langage et options régionales" + IDS_CPLDESCRIPTION "Sélectionner le langage, les formats de nombres, les devises, l'heure et la date." END Propchange: trunk/reactos/dll/cpl/intl_new/Fr.rc ------------------------------------------------------------------------------ --- svn:eol-style (original) +++ svn:eol-style (removed) @@ -1,1 +1,0 @@ -native
17 years, 11 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
41
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
Results per page:
10
25
50
100
200