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
October 2017
----- 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
43 participants
275 discussions
Start a n
N
ew thread
[reactos] 01/01: [MSI] Fix a buffer overrun in build_default_format CORE-13881 Imported wine commit: f517022: msi: Fix an invalid write in build_default_format (Valgrind).
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4dafcc5ea250673993995…
commit 4dafcc5ea250673993995c4d5a60d8d250e9eb7a Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Oct 8 23:41:02 2017 +0200 [MSI] Fix a buffer overrun in build_default_format CORE-13881 Imported wine commit: f517022: msi: Fix an invalid write in build_default_format (Valgrind). --- dll/win32/msi/format.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/dll/win32/msi/format.c b/dll/win32/msi/format.c index 10baa0ef04..3b8a472d15 100644 --- a/dll/win32/msi/format.c +++ b/dll/win32/msi/format.c @@ -323,29 +323,28 @@ static WCHAR *deformat_literal( FORMAT *format, FORMSTR *str, BOOL *propfound, return replaced; } -static LPWSTR build_default_format(const MSIRECORD* record) +static WCHAR *build_default_format( const MSIRECORD *record ) { - int i; - int count; - WCHAR *rc, buf[26]; static const WCHAR fmt[] = {'%','i',':',' ','[','%','i',']',' ',0}; - DWORD size; + int i, count = MSI_RecordGetFieldCount( record ); + WCHAR *ret, *tmp, buf[26]; + DWORD size = 1; - count = MSI_RecordGetFieldCount(record); - - rc = msi_alloc(1); - rc[0] = 0; - size = 1; + if (!(ret = msi_alloc( sizeof(*ret) ))) return NULL; + ret[0] = 0; for (i = 1; i <= count; i++) { - sprintfW(buf, fmt, i, i); - size += lstrlenW(buf); - rc = msi_realloc(rc, size * sizeof(WCHAR)); - lstrcatW(rc, buf); + size += sprintfW( buf, fmt, i, i ); + if (!(tmp = msi_realloc( ret, size * sizeof(*ret) ))) + { + msi_free( ret ); + return NULL; + } + ret = tmp; + strcatW( ret, buf ); } - - return rc; + return ret; } static BOOL format_is_number(WCHAR x)
7 years, 2 months
1
0
0
0
[reactos] 01/01: [MSI] Addendum to 71bffdc as I removed this unintentionally.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=15786900c98cfa890d4da…
commit 15786900c98cfa890d4dae1c2fe9ec1fc929801c Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Mon Oct 9 12:32:09 2017 +0100 [MSI] Addendum to 71bffdc as I removed this unintentionally. --- dll/win32/msi/action.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c index 8c17f3b512..98aaec49f3 100644 --- a/dll/win32/msi/action.c +++ b/dll/win32/msi/action.c @@ -4774,10 +4774,17 @@ static UINT ACTION_RemoveIniValues( MSIPACKAGE *package ) static void register_dll( const WCHAR *dll, BOOL unregister ) { +#ifdef __REACTOS__ + static const WCHAR regW[] = + {'r','e','g','s','v','r','3','2','.','e','x','e',' ','/','s',' ','\"','%','s','\"',0}; + static const WCHAR unregW[] = + {'r','e','g','s','v','r','3','2','.','e','x','e',' ','/','s',' ','/','u',' ','\"','%','s','\"',0}; +#else /* __REACTOS__ */ static const WCHAR regW[] = {'r','e','g','s','v','r','3','2','.','e','x','e',' ','\"','%','s','\"',0}; static const WCHAR unregW[] = {'r','e','g','s','v','r','3','2','.','e','x','e',' ','/','u',' ','\"','%','s','\"',0}; +#endif /* __REACTOS__ */ PROCESS_INFORMATION pi; STARTUPINFOW si; WCHAR *cmd;
7 years, 2 months
1
0
0
0
[reactos] 01/01: README.md: Fix missing links
by Alexander Shaposhnikov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=48b27145781d7a0b7fc2d…
commit 48b27145781d7a0b7fc2d6772ad8c767c1af598c Author: Alexander Shaposhnikov <sanchaez(a)reactos.org> AuthorDate: Mon Oct 9 05:03:46 2017 +0300 README.md: Fix missing links --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8894fdb916..06d7906045 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ <img src="
https://reactos.org/wiki/images/0/02/ReactOS_logo.png
"> </p> -[![license.badge]][license.link] [![ghcontrib.badge]]() [![ghstats.badge]]() [![commits.badge]]() [![coverity.badge]][coverity.link] +[![license.badge]][license.link] [![ghcontrib.badge]][ghcontrib.link] [![ghstats.badge]][ghstats.link] [![commits.badge]][commits.link] [![coverity.badge]][coverity.link] ## Quick Links @@ -98,6 +98,7 @@ There is also an obsolete [SVN archive
repository](https://svn.reactos.org/svn/r
[travis.link]:
https://travis-ci.org/reactos/reactos
[appveyor.link]:
https://ci.appveyor.com/project/AmineKhaldi/reactos
[coverity.link]:
https://scan.coverity.com/projects/205
+[commits.link]:
https://github.com/reactos/reactos/commits/master
[release.link]:
https://sourceforge.net/projects/reactos/files/ReactOS/0.4.6
[license.link]:
https://spdx.org/licenses/GPL-2.0+.html
[sfstats.link]:
https://sourceforge.net/projects/reactos
7 years, 2 months
1
0
0
0
[reactos] 01/01: README.md: Added badges
by Alexander Shaposhnikov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7cffc6d5ce69ae02fe92e…
commit 7cffc6d5ce69ae02fe92e9644d5584931ab49d49 Author: Alexander Shaposhnikov <sanchaez(a)reactos.org> AuthorDate: Mon Oct 9 03:07:40 2017 +0300 README.md: Added badges Added various badges: CI, SourceForge, GitHub stats etc. Centered image Fixed some typos --- README.md | 67 ++++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 80825631ca..8894fdb916 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ -# ReactOS Project +# ReactOS Project [![release.badge]][release.link] [![sfstats.badge]][sfstats.link] [![travis.badge]][travis.link] [![appveyor.badge]][appveyor.link] -Current version: __0.4.6__ -![ReactOS
Logo](https://reactos.org/wiki/images/0/02/ReactOS_logo.png)
+<p align=center> +<img src="
https://reactos.org/wiki/images/0/02/ReactOS_logo.png
"> +</p> + +[![license.badge]][license.link] [![ghcontrib.badge]]() [![ghstats.badge]]() [![commits.badge]]() [![coverity.badge]][coverity.link] ## Quick Links + - [Website](https://reactos.org) - [
Wiki](https://reactos.org/wiki)
- [
Forum](https://reactos.org/forum)
@@ -13,27 +17,22 @@ Current version: __0.4.6__ ## What is ReactOS? -ReactOS™ is an Open Source effort to develop a quality operating system that is -compatible with applications and drivers written for the Microsoft® Windows™ NT -family of operating systems (NT4, 2000, XP, 2003, Vista, Seven). +ReactOS™ is an Open Source effort to develop a quality operating system that is compatible with applications and drivers written for the Microsoft® Windows™ NT family of operating systems (NT4, 2000, XP, 2003, Vista, Seven). -The ReactOS project, although currently focused on Windows Server 2003 -compatibility, is always keeping an eye toward compatibility with -Windows Vista and future Windows NT releases. +The ReactOS project, although currently focused on Windows Server 2003 compatibility, is always keeping an eye toward compatibility with Windows Vista and future Windows NT releases. The code of ReactOS is licensed under [GNU GPL
2.0+](https://spdx.org/licenses/GPL-2.0+.html)
. -## Building +## Building [![rosbewin.badge]][rosbewin.link] [![rosbeunix.badge]][rosbeunix.link] -To build the system it is strongly advised to use the _ReactOS Build Environment -(RosBE)._ Up-to-date versions for Windows and for Unix/GNU-Linux are available -from our download page at:
http://www.reactos.org/wiki/Build_Environment
+To build the system it is strongly advised to use the _ReactOS Build Environment (RosBE)._ +Up-to-date versions for Windows and for Unix/GNU-Linux are available from our download page at:
http://www.reactos.org/wiki/Build_Environment
. -Alternatively one can use Microsoft Visual C++ (MSVC) version 2010+. Building with MSVC is covered here:
https://www.reactos.org/wiki/Building_with_MSVC
+Alternatively one can use Microsoft Visual C++ (MSVC) version 2010+. Building with MSVC is covered here:
https://www.reactos.org/wiki/Building_with_MSVC
. ### Binaries -To build ReactOS you must use run `configure` script in the directory you want to have builds. Choose `configure.cmd` or `configure.sh` depending on your system. Then run `ninja <modulename>` to build a module you want or just `ninja` to build all modules. +To build ReactOS you must run the `configure` script in the directory you want to have your build files. Choose `configure.cmd` or `configure.sh` depending on your system. Then run `ninja <modulename>` to build a module you want or just `ninja` to build all modules. ### Bootable images @@ -44,14 +43,11 @@ See ["Building ReactOS"](http://www.reactos.org/wiki/Building_ReactOS) for more ## Installing -ReactOS can only be installed on a machine that has a FAT16 or FAT32 partition -as the active (bootable) partition. The partition on which ReactOS is to be -installed (which may or may not be the bootable partition) must also be -formatted as FAT16 or FAT32. ReactOS Setup can format the partitions if -needed. +ReactOS currently can only be installed on a machine that has a FAT16 or FAT32 partition as the active (bootable) partition. +The partition on which ReactOS is to be installed (which may or may not be the bootable partition) must also be formatted as FAT16 or FAT32. +ReactOS Setup can format the partitions if needed. -To install ReactOS from the bootable CD distribution, extract the archive -contents. Then burn the CD image, boot from it, and follow instructions. +To install ReactOS from the bootable CD distribution, extract the archive contents. Then burn the CD image, boot from it, and follow the instructions. See ["Installing ReactOS"](https://www.reactos.org/wiki/Installing_ReactOS) Wiki page or [INSTALL](INSTALL) for more details. @@ -74,15 +70,38 @@ ReactOS is also not "yet another OS". It does not attempt to be a third player l More information is available at:
https://www.reactos.org
. -Also see the [media\doc](/media/doc/) subdirectory for some sparse notes. +Also see the [media/doc](/media/doc/) subdirectory for some sparse notes. ## Who is responsible Active devs are listed as members of [GitHub
organization](https://github.com/orgs/reactos/people)
. -Also see the [CREDITS](CREDITS) file for others. +See also the [CREDITS](CREDITS) file for others. ## Code mirrors The main development is done on [
GitHub](https://github.com/reactos/reactos)
. We have an [alternative
mirror](https://git.reactos.org/)
in case GitHub is down. There is also an obsolete [SVN archive
repository](https://svn.reactos.org/svn/reactos?view=revision)
that is kept for historical purposes. + +[travis.badge]:
https://travis-ci.org/reactos/reactos.svg?branch=master
+[appveyor.badge]:
https://ci.appveyor.com/api/projects/status/github/reactos/reactos?branch=m…
+[coverity.badge]:
https://scan.coverity.com/projects/205/badge.svg?flat=1
+[commits.badge]:
https://img.shields.io/github/commits-since/reactos/reactos/0.4.7-dev.svg
+[release.badge]:
https://img.shields.io/badge/release-0.4.6-brightgreen.svg
+[license.badge]:
https://img.shields.io/badge/license-GNU_GPL_2.0+-blue.svg
+[sfstats.badge]:
https://img.shields.io/sourceforge/dm/reactos.svg
+[ghstats.badge]:
https://img.shields.io/github/commit-activity/4w/reactos/reactos.svg
+[ghcontrib.badge]:
https://img.shields.io/github/contributors/reactos/reactos.svg
+[rosbewin.badge]:
https://img.shields.io/badge/RosBE_Windows-2.1.5-blue.svg
+[rosbeunix.badge]:
https://img.shields.io/badge/RosBE_Unix-2.1.2-blue.svg
+ +[travis.link]:
https://travis-ci.org/reactos/reactos
+[appveyor.link]:
https://ci.appveyor.com/project/AmineKhaldi/reactos
+[coverity.link]:
https://scan.coverity.com/projects/205
+[release.link]:
https://sourceforge.net/projects/reactos/files/ReactOS/0.4.6
+[license.link]:
https://spdx.org/licenses/GPL-2.0+.html
+[sfstats.link]:
https://sourceforge.net/projects/reactos
+[ghstats.link]:
https://github.com/reactos/reactos/graphs/commit-activity
+[ghcontrib.link]:
https://github.com/reactos/reactos/graphs/contributors
+[rosbewin.link]:
https://sourceforge.net/projects/reactos/files/RosBE-Windows/i386/2.1.5/
+[rosbeunix.link]:
https://sourceforge.net/projects/reactos/files/RosBE-Unix/2.1.2/
7 years, 2 months
1
0
0
0
[reactos] 01/01: CORE-13875 Added russian translation for timeout util
by Sergey Stopkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c8d97709cbbfc727ccf48…
commit c8d97709cbbfc727ccf48d799202243804c25229 Author: Sergey Stopkin <stopkin.sergey(a)gmail.com> AuthorDate: Sun Oct 8 16:15:39 2017 +0600 CORE-13875 Added russian translation for timeout util --- base/applications/cmdutils/timeout/lang/ru-RU.rc | 34 ++++++++++++++++++++++++ base/applications/cmdutils/timeout/timeout.rc | 3 +++ 2 files changed, 37 insertions(+) diff --git a/base/applications/cmdutils/timeout/lang/ru-RU.rc b/base/applications/cmdutils/timeout/lang/ru-RU.rc new file mode 100644 index 0000000000..ae69579d37 --- /dev/null +++ b/base/applications/cmdutils/timeout/lang/ru-RU.rc @@ -0,0 +1,34 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_USAGE "ReactOS Timeout Utility\n\ +\n\ +TIMEOUT [/?] [/T] таймаут [/NOBREAK]\n\ +\n\ +Описание:\n\ + Команда позволяет организовать режим ожидания фиксированного интервала\n\ + времени, в секундах, либо интервала до нажатия клавиши на клавиатуре.\n\ +\n\ +Синтаксис:\n\ + /? Показать эту справку.\n\ +\n\ + /T таймаут Время ожидания в секундах.\n\ + Допустимый интервал: от -1 до 99999 секунд.\n\ + Значение таймаута, равное -1 задает неограниченное время\n\ + ожидания до нажатия клавиши.\n\ + Ключ ""/T"" не является обязательным. Допускается указание\n\ + значения таймера без указания ключа.\n\ +\n\ + /NOBREAK Игнорировать нажатия клавиш, кроме сочетания Ctrl+C.\n\ +" + IDS_ERROR_OUT_OF_RANGE "Ошибка: Значение таймера должно находиться в пределах диапазона (от -1 до 99999).\n" + IDS_ERROR_INVALID_HANDLE_VALUE "Ошибка: Не удалось получить стандартный дескриптор консоли (ошибка %lu).\n" + IDS_ERROR_READ_INPUT "Ошибка: Невозможно прочитать консольный ввод (ошибка %lu).\n" + IDS_ERROR_NO_TIMER_VALUE "Ошибка: Значение таймера должно быть указано (от -1 до 99999).\n" + IDS_ERROR_ONE_TIME "Ошибка: Требуется только одно значение таймера.\n" + IDS_NOBREAK_INPUT "Нажмите Ctrl+C для выхода..." + IDS_USER_INPUT "Нажмите любую клавишу для продолжения..." + IDS_NOBREAK_INPUT_COUNT "Время ожидания %d секунд, нажмите Ctrl+C для выхода..." + IDS_USER_INPUT_COUNT "Время ожидания %d секунд, нажмите любую клавишу для продолжения..." +END diff --git a/base/applications/cmdutils/timeout/timeout.rc b/base/applications/cmdutils/timeout/timeout.rc index 80643a1eab..e5156b41b1 100644 --- a/base/applications/cmdutils/timeout/timeout.rc +++ b/base/applications/cmdutils/timeout/timeout.rc @@ -22,3 +22,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_IT_IT #include "lang/it-IT.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif
7 years, 2 months
1
0
0
0
[reactos] 01/01: ru calculator translation update
by Victor Kukshiev
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2ece6171c0151da802b19…
commit 2ece6171c0151da802b195cfea638f19415aae50 Author: Victor Kukshiev <andrey0bolkonsky(a)gmail.com> AuthorDate: Sat Oct 7 23:02:57 2017 +0300 ru calculator translation update --- base/applications/calc/lang/ru-RU.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/applications/calc/lang/ru-RU.rc b/base/applications/calc/lang/ru-RU.rc index a9d0036114..626d645f68 100644 --- a/base/applications/calc/lang/ru-RU.rc +++ b/base/applications/calc/lang/ru-RU.rc @@ -491,15 +491,15 @@ BEGIN IDS_CURRENCY_CZECH_KORUNA "Чешская крона" IDS_CURRENCY_DEUTSCHE_MARK "Немецкая марка" IDS_CURRENCY_DUTCH_GUILDER "Голландский гульден" - IDS_CURRENCY_ESTONIAN_KROON "Estonian kroon" + IDS_CURRENCY_ESTONIAN_KROON "Эстонская крона" IDS_CURRENCY_EURO "Евро" IDS_CURRENCY_FINNISH_MARKKA "Финская марка" IDS_CURRENCY_FRENCH_FRANC "Французский франк" IDS_CURRENCY_GREEK_DRACHMA "Греческая драхма" IDS_CURRENCY_IRISH_POUND "Ирландский фунт" IDS_CURRENCY_ITALIAN_LIRA "Итальянская лира" - IDS_CURRENCY_LATVIAN_LATS "Latvian lats" - IDS_CURRENCY_LITHUANIAN_LITAS "Lithuanian litas" + IDS_CURRENCY_LATVIAN_LATS "Латвийский лат" + IDS_CURRENCY_LITHUANIAN_LITAS "Литовский лит" IDS_CURRENCY_LUXEMBOURG_FRANC "Люксембургский франк" IDS_CURRENCY_MALTESE_LIRA "Мальтийская лира" IDS_CURRENCY_PORTOGUESE_ESCUDO "Португальское эскудо"
7 years, 2 months
1
0
0
0
[reactos] 03/03: [NDK] Improve NDK tests for KTHREAD and add them to build
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c22817db06a46bcd2012f…
commit c22817db06a46bcd2012faeed35a14a236b27bd2 Author: Timo Kreuzer <timo(a)reactos.org> AuthorDate: Wed Aug 16 08:41:41 2017 +0200 [NDK] Improve NDK tests for KTHREAD and add them to build --- CMakeLists.txt | 1 + sdk/include/ndk/tests/CMakeLists.txt | 2 + sdk/include/ndk/tests/win10_x64.c | 137 +++++++++++++++++---------------- sdk/include/ndk/tests/win10_x86.c | 128 ++++++++++++++++--------------- sdk/include/ndk/tests/win2003_x64.c | 57 +++++++------- sdk/include/ndk/tests/win2003_x86.c | 32 ++++---- sdk/include/ndk/tests/win7_x64.c | 43 ++++++----- sdk/include/ndk/tests/win7_x86.c | 36 ++++----- sdk/include/ndk/tests/win81_x64.c | 144 ++++++++++++++++++++--------------- sdk/include/ndk/tests/win81_x86.c | 129 +++++++++++++++++-------------- sdk/include/ndk/tests/win8_x64.c | 78 ++++++++++--------- sdk/include/ndk/tests/win8_x86.c | 18 +++-- sdk/include/ndk/tests/winvista_x64.c | 56 +++++++------- sdk/include/ndk/tests/winvista_x86.c | 62 +++++++-------- 14 files changed, 489 insertions(+), 434 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7e0d9bd2f..f4c38c85f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -250,6 +250,7 @@ else() add_dependency_header() + add_subdirectory(sdk/include/ndk/tests) add_subdirectory(sdk/include/xdk) add_subdirectory(sdk/include/psdk) add_subdirectory(sdk/include/dxsdk) diff --git a/sdk/include/ndk/tests/CMakeLists.txt b/sdk/include/ndk/tests/CMakeLists.txt index df01c65517..a72c95f037 100644 --- a/sdk/include/ndk/tests/CMakeLists.txt +++ b/sdk/include/ndk/tests/CMakeLists.txt @@ -16,3 +16,5 @@ add_library(ndk_tests win81_x86.c win10_x86.c) endif() + +add_dependencies(ndk_tests xdk psdk bugcodes) diff --git a/sdk/include/ndk/tests/win10_x64.c b/sdk/include/ndk/tests/win10_x64.c index 5d326642ef..1ccde8ce99 100644 --- a/sdk/include/ndk/tests/win10_x64.c +++ b/sdk/include/ndk/tests/win10_x64.c @@ -7,113 +7,116 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress) -C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget) +C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget) C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack) C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase) -C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock) -C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime) -C_ASSERT_FIELD(KTHREAD, 0x050, ULONG32, CurrentRunTime) -C_ASSERT_FIELD(KTHREAD, 0x054, ULONG32, ExpectedRunTime) +C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock) +C_ASSERT_FIELD(KTHREAD, 0x048, ULONG64, CycleTime) +C_ASSERT_FIELD(KTHREAD, 0x050, ULONG, CurrentRunTime) +C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ExpectedRunTime) C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack) -C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea) -C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup) +C_ASSERT_FIELD(KTHREAD, 0x060, PXSAVE_FORMAT, StateSaveArea) +C_ASSERT_FIELD(KTHREAD, 0x068, struct _KSCHEDULING_GROUP*, SchedulingGroup) C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister) -C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running) +C_ASSERT_FIELD(KTHREAD, 0x071, UCHAR, Running) C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted) -C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags) -C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags) -C_ASSERT_FIELD(KTHREAD, 0x07C, UINT8, Tag) -C_ASSERT_FIELD(KTHREAD, 0x07D, UINT8, SystemHeteroCpuPolicy) -C_ASSERT_FIELD(KTHREAD, 0x080, ULONG32, SystemCallNumber) +C_ASSERT_FIELD(KTHREAD, 0x074, LONG, MiscFlags) +C_ASSERT_FIELD(KTHREAD, 0x078, LONG, ThreadFlags) +C_ASSERT_FIELD(KTHREAD, 0x07C, UCHAR, Tag) +C_ASSERT_FIELD(KTHREAD, 0x07D, UCHAR, SystemHeteroCpuPolicy) +C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, SystemCallNumber) +C_ASSERT_FIELD(KTHREAD, 0x084, ULONG, Spare1) C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument) -C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x090, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState) C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority) -C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG32, UserIdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG, UserIdealProcessor) +C_ASSERT_FIELD(KTHREAD, 0x0C8, LONG64, WaitStatus) +C_ASSERT_FIELD(KTHREAD, 0x0D0, PKWAIT_BLOCK, WaitBlockList) C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x0E8, DISPATCHER_HEADER*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x0E8, PDISPATCHER_HEADER, Queue) C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias) +C_ASSERT_FIELD(KTHREAD, 0x0F8, ULONG64, RelativeTimerBias) C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer) C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x154, ULONG32, ContextSwitches) -C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State) +C_ASSERT_FIELD(KTHREAD, 0x154, ULONG, ContextSwitches) +C_ASSERT_FIELD(KTHREAD, 0x184, UCHAR, State) C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, Spare13) -C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql) +C_ASSERT_FIELD(KTHREAD, 0x186, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode) -C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG32, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG32, CombinedApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters) -C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave) +C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, WaitTime) +C_ASSERT_FIELD(KTHREAD, 0x1E4, SHORT, KernelApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x1E6, SHORT, SpecialApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG, CombinedApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x168, PKTHREAD_COUNTERS, ThreadCounters) +C_ASSERT_FIELD(KTHREAD, 0x198, PXSTATE_SAVE, XStateSave) C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread) -C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb) -C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch) +C_ASSERT_FIELD(KTHREAD, 0x1F0, struct _UMS_CONTROL_BLOCK*, Ucb) +C_ASSERT_FIELD(KTHREAD, 0x1F8, struct _KUMS_CONTEXT_HEADER*, Uch) C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa) C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x218, ULONG32, NextProcessor) -C_ASSERT_FIELD(KTHREAD, 0x21C, LONG32, QueuePriority) -C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x218, ULONG, NextProcessor) +C_ASSERT_FIELD(KTHREAD, 0x21C, LONG, QueuePriority) +C_ASSERT_FIELD(KTHREAD, 0x220, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity) C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode) C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority) C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement) -C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted) -C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason) +C_ASSERT_FIELD(KTHREAD, 0x235, UCHAR, Preempted) +C_ASSERT_FIELD(KTHREAD, 0x236, UCHAR, AdjustReason) C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement) -C_ASSERT_FIELD(KTHREAD, 0x238, UINT64, AffinityVersion) +C_ASSERT_FIELD(KTHREAD, 0x238, ULONG64, AffinityVersion) C_ASSERT_FIELD(KTHREAD, 0x240, GROUP_AFFINITY, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x24A, UINT8, ApcStateIndex) -C_ASSERT_FIELD(KTHREAD, 0x24B, UINT8, WaitBlockCount) -C_ASSERT_FIELD(KTHREAD, 0x24C, ULONG32, IdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x250, UINT64, NpxState) +C_ASSERT_FIELD(KTHREAD, 0x24A, UCHAR, ApcStateIndex) +C_ASSERT_FIELD(KTHREAD, 0x24B, UCHAR, WaitBlockCount) +C_ASSERT_FIELD(KTHREAD, 0x24C, ULONG, IdealProcessor) +C_ASSERT_FIELD(KTHREAD, 0x250, ULONG64, NpxState) C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason) +C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation) -C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount) +C_ASSERT_FIELD(KTHREAD, 0x286, USHORT, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc) -C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG32, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb) +C_ASSERT_FIELD(KTHREAD, 0x289, UCHAR, ResourceIndex) +C_ASSERT_FIELD(KTHREAD, 0x28B, UCHAR, QuantumReset) +C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG, KernelTime) +C_ASSERT_FIELD(KTHREAD, 0x2C8, PKPRCB, WaitPrcb) C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel) -C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG32, UserTime) +C_ASSERT_FIELD(KTHREAD, 0x2DB, UCHAR, CallbackNestingLevel) +C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent) C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead) -C_ASSERT_FIELD(KTHREAD, 0x318, UINT8, AbEntrySummary) -C_ASSERT_FIELD(KTHREAD, 0x319, UINT8, AbWaitEntryCount) -C_ASSERT_FIELD(KTHREAD, 0x31A, UINT16, Spare20) -C_ASSERT_FIELD(KTHREAD, 0x31C, ULONG32, SecureThreadCookie) +C_ASSERT_FIELD(KTHREAD, 0x318, UCHAR, AbEntrySummary) +C_ASSERT_FIELD(KTHREAD, 0x319, UCHAR, AbWaitEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x31A, USHORT, Spare20) +C_ASSERT_FIELD(KTHREAD, 0x31C, ULONG, SecureThreadCookie) C_ASSERT_FIELD(KTHREAD, 0x320, KLOCK_ENTRY[6], LockEntries) C_ASSERT_FIELD(KTHREAD, 0x560, SINGLE_LIST_ENTRY, PropagateBoostsEntry) C_ASSERT_FIELD(KTHREAD, 0x568, SINGLE_LIST_ENTRY, IoSelfBoostsEntry) C_ASSERT_FIELD(KTHREAD, 0x570, UINT8[16], PriorityFloorCounts) -C_ASSERT_FIELD(KTHREAD, 0x580, ULONG32, PriorityFloorSummary) -C_ASSERT_FIELD(KTHREAD, 0x584, LONG32, AbCompletedIoBoostCount) -C_ASSERT_FIELD(KTHREAD, 0x588, INT16, KeReferenceCount) -C_ASSERT_FIELD(KTHREAD, 0x58A, UINT8, AbOrphanedEntrySummary) -C_ASSERT_FIELD(KTHREAD, 0x58B, UINT8, AbOwnedEntryCount) -C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG32, ForegroundLossTime) +C_ASSERT_FIELD(KTHREAD, 0x580, ULONG, PriorityFloorSummary) +C_ASSERT_FIELD(KTHREAD, 0x584, LONG, AbCompletedIoBoostCount) +C_ASSERT_FIELD(KTHREAD, 0x588, SHORT, KeReferenceCount) +C_ASSERT_FIELD(KTHREAD, 0x58A, UCHAR, AbOrphanedEntrySummary) +C_ASSERT_FIELD(KTHREAD, 0x58B, UCHAR, AbOwnedEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG, ForegroundLossTime) C_ASSERT_FIELD(KTHREAD, 0x590, LIST_ENTRY, GlobalForegroundListEntry) C_ASSERT_FIELD(KTHREAD, 0x590, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry) -C_ASSERT_FIELD(KTHREAD, 0x598, UINT64, InGlobalForegroundList) -C_ASSERT_FIELD(KTHREAD, 0x5A0, INT64, ReadOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x5A8, INT64, WriteOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x5B0, INT64, OtherOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x5B8, INT64, ReadTransferCount) -C_ASSERT_FIELD(KTHREAD, 0x5C0, INT64, WriteTransferCount) -C_ASSERT_FIELD(KTHREAD, 0x5C8, INT64, OtherTransferCount) -C_ASSERT_FIELD(KTHREAD, 0x5D0, KSCB*, QueuedScb) +C_ASSERT_FIELD(KTHREAD, 0x598, ULONG64, InGlobalForegroundList) +C_ASSERT_FIELD(KTHREAD, 0x5A0, LONG64, ReadOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x5A8, LONG64, WriteOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x5B0, LONG64, OtherOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x5B8, LONG64, ReadTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x5C0, LONG64, WriteTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x5C8, LONG64, OtherTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x5D0, struct _KSCB*, QueuedScb) diff --git a/sdk/include/ndk/tests/win10_x86.c b/sdk/include/ndk/tests/win10_x86.c index 7a5276d7b7..9693ecfddf 100644 --- a/sdk/include/ndk/tests/win10_x86.c +++ b/sdk/include/ndk/tests/win10_x86.c @@ -7,105 +7,107 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress) -C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget) +C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, QuantumTarget) C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack) C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase) -C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG32, ThreadLock) -C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime) -C_ASSERT_FIELD(KTHREAD, 0x038, ULONG32, HighCycleTime) +C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG, ThreadLock) +C_ASSERT_FIELD(KTHREAD, 0x030, ULONG64, CycleTime) +C_ASSERT_FIELD(KTHREAD, 0x038, ULONG, HighCycleTime) C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable) -C_ASSERT_FIELD(KTHREAD, 0x040, ULONG32, CurrentRunTime) -C_ASSERT_FIELD(KTHREAD, 0x044, ULONG32, ExpectedRunTime) +C_ASSERT_FIELD(KTHREAD, 0x040, ULONG, CurrentRunTime) +C_ASSERT_FIELD(KTHREAD, 0x044, ULONG, ExpectedRunTime) C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack) -C_ASSERT_FIELD(KTHREAD, 0x04C, XSAVE_FORMAT*, StateSaveArea) -C_ASSERT_FIELD(KTHREAD, 0x050, KSCHEDULING_GROUP*, SchedulingGroup) +C_ASSERT_FIELD(KTHREAD, 0x04C, PXSAVE_FORMAT, StateSaveArea) +C_ASSERT_FIELD(KTHREAD, 0x050, struct _KSCHEDULING_GROUP*, SchedulingGroup) C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister) -C_ASSERT_FIELD(KTHREAD, 0x055, UINT8, Running) -C_ASSERT_FIELD(KTHREAD, 0x056, UINT8[2], Alerted) -C_ASSERT_FIELD(KTHREAD, 0x058, LONG32, MiscFlags) -C_ASSERT_FIELD(KTHREAD, 0x05C, LONG32, ThreadFlags) -C_ASSERT_FIELD(KTHREAD, 0x060, UINT8, Tag) -C_ASSERT_FIELD(KTHREAD, 0x061, UINT8, SystemHeteroCpuPolicy) -C_ASSERT_FIELD(KTHREAD, 0x063, UINT8, Spare0) -C_ASSERT_FIELD(KTHREAD, 0x064, ULONG32, SystemCallNumber) +C_ASSERT_FIELD(KTHREAD, 0x055, UCHAR, Running) +C_ASSERT_FIELD(KTHREAD, 0x056, UCHAR[2], Alerted) +C_ASSERT_FIELD(KTHREAD, 0x058, LONG, MiscFlags) +C_ASSERT_FIELD(KTHREAD, 0x05C, LONG, ThreadFlags) +C_ASSERT_FIELD(KTHREAD, 0x060, UCHAR, Tag) +C_ASSERT_FIELD(KTHREAD, 0x061, UCHAR, SystemHeteroCpuPolicy) +C_ASSERT_FIELD(KTHREAD, 0x063, UCHAR, Spare0) +C_ASSERT_FIELD(KTHREAD, 0x064, ULONG, SystemCallNumber) C_ASSERT_FIELD(KTHREAD, 0x068, PVOID, FirstArgument) -C_ASSERT_FIELD(KTHREAD, 0x06C, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x06C, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x070, KAPC_STATE, ApcState) -C_ASSERT_FIELD(KTHREAD, 0x088, ULONG32, UserIdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG32, ContextSwitches) -C_ASSERT_FIELD(KTHREAD, 0x090, UINT8, State) -C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, Spare12) -C_ASSERT_FIELD(KTHREAD, 0x092, UINT8, WaitIrql) +C_ASSERT_FIELD(KTHREAD, 0x088, ULONG, UserIdealProcessor) +C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG, ContextSwitches) +C_ASSERT_FIELD(KTHREAD, 0x090, UCHAR, State) +//C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, Spare12) +C_ASSERT_FIELD(KTHREAD, 0x092, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, WaitMode) -C_ASSERT_FIELD(KTHREAD, 0x094, LONG32, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x094, LONG, WaitStatus) +C_ASSERT_FIELD(KTHREAD, 0x098, PKWAIT_BLOCK, WaitBlockList) C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x0A4, DISPATCHER_HEADER*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x0A4, PDISPATCHER_HEADER, Queue) C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb) -C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias) +C_ASSERT_FIELD(KTHREAD, 0x0B0, ULONG64, RelativeTimerBias) C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer) C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x0F4, KTHREAD_COUNTERS*, ThreadCounters) -C_ASSERT_FIELD(KTHREAD, 0x10C, XSTATE_SAVE*, XStateSave) +C_ASSERT_FIELD(KTHREAD, 0x0F4, PKTHREAD_COUNTERS, ThreadCounters) +C_ASSERT_FIELD(KTHREAD, 0x10C, PXSTATE_SAVE, XStateSave) C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, Win32Thread) -C_ASSERT_FIELD(KTHREAD, 0x138, ULONG32, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x13C, INT16, KernelApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x13E, INT16, SpecialApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG32, CombinedApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x138, ULONG, WaitTime) +C_ASSERT_FIELD(KTHREAD, 0x13C, SHORT, KernelApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x13E, SHORT, SpecialApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, CombinedApcDisable) C_ASSERT_FIELD(KTHREAD, 0x140, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x148, ULONG32, NextProcessor) -C_ASSERT_FIELD(KTHREAD, 0x14C, LONG32, QueuePriority) -C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, NextProcessor) +C_ASSERT_FIELD(KTHREAD, 0x14C, LONG, QueuePriority) +C_ASSERT_FIELD(KTHREAD, 0x150, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, UserAffinity) C_ASSERT_FIELD(KTHREAD, 0x15A, CHAR, PreviousMode) C_ASSERT_FIELD(KTHREAD, 0x15B, CHAR, BasePriority) C_ASSERT_FIELD(KTHREAD, 0x15C, CHAR, PriorityDecrement) -C_ASSERT_FIELD(KTHREAD, 0x15D, UINT8, Preempted) -C_ASSERT_FIELD(KTHREAD, 0x15E, UINT8, AdjustReason) +C_ASSERT_FIELD(KTHREAD, 0x15D, UCHAR, Preempted) +C_ASSERT_FIELD(KTHREAD, 0x15E, UCHAR, AdjustReason) C_ASSERT_FIELD(KTHREAD, 0x15F, CHAR, AdjustIncrement) -C_ASSERT_FIELD(KTHREAD, 0x160, ULONG32, AffinityVersion) +C_ASSERT_FIELD(KTHREAD, 0x160, ULONG, AffinityVersion) C_ASSERT_FIELD(KTHREAD, 0x164, GROUP_AFFINITY, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x16A, UINT8, ApcStateIndex) -C_ASSERT_FIELD(KTHREAD, 0x16B, UINT8, WaitBlockCount) -C_ASSERT_FIELD(KTHREAD, 0x16C, ULONG32, IdealProcessor) +C_ASSERT_FIELD(KTHREAD, 0x16A, UCHAR, ApcStateIndex) +C_ASSERT_FIELD(KTHREAD, 0x16B, UCHAR, WaitBlockCount) +C_ASSERT_FIELD(KTHREAD, 0x16C, ULONG, IdealProcessor) C_ASSERT_FIELD(KTHREAD, 0x174, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x18B, UINT8, WaitReason) +C_ASSERT_FIELD(KTHREAD, 0x18B, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x18C, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x18D, CHAR, Saturation) -C_ASSERT_FIELD(KTHREAD, 0x18E, UINT16, SListFaultCount) +C_ASSERT_FIELD(KTHREAD, 0x18E, USHORT, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x190, KAPC, SchedulerApc) -C_ASSERT_FIELD(KTHREAD, 0x191, UINT8, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x193, UINT8, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x194, ULONG32, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x1B4, KPRCB*, WaitPrcb) +C_ASSERT_FIELD(KTHREAD, 0x191, UCHAR, ResourceIndex) +C_ASSERT_FIELD(KTHREAD, 0x193, UCHAR, QuantumReset) +C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, KernelTime) +C_ASSERT_FIELD(KTHREAD, 0x1B4, PKPRCB, WaitPrcb) C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x1BF, UINT8, CallbackNestingLevel) -C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime) +C_ASSERT_FIELD(KTHREAD, 0x1BF, UCHAR, CallbackNestingLevel) +C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent) C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead) -C_ASSERT_FIELD(KTHREAD, 0x1E4, UINT8, AbEntrySummary) -C_ASSERT_FIELD(KTHREAD, 0x1E5, UINT8, AbWaitEntryCount) -C_ASSERT_FIELD(KTHREAD, 0x1E6, UINT16, Spare20) +C_ASSERT_FIELD(KTHREAD, 0x1E4, UCHAR, AbEntrySummary) +C_ASSERT_FIELD(KTHREAD, 0x1E5, UCHAR, AbWaitEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x1E6, USHORT, Spare20) C_ASSERT_FIELD(KTHREAD, 0x1E8, KLOCK_ENTRY[6], LockEntries) C_ASSERT_FIELD(KTHREAD, 0x308, SINGLE_LIST_ENTRY, PropagateBoostsEntry) C_ASSERT_FIELD(KTHREAD, 0x30C, SINGLE_LIST_ENTRY, IoSelfBoostsEntry) -C_ASSERT_FIELD(KTHREAD, 0x310, UINT8[16], PriorityFloorCounts) -C_ASSERT_FIELD(KTHREAD, 0x320, ULONG32, PriorityFloorSummary) -C_ASSERT_FIELD(KTHREAD, 0x324, LONG32, AbCompletedIoBoostCount) -C_ASSERT_FIELD(KTHREAD, 0x328, INT16, KeReferenceCount) -C_ASSERT_FIELD(KTHREAD, 0x32A, UINT8, AbOrphanedEntrySummary) -C_ASSERT_FIELD(KTHREAD, 0x32B, UINT8, AbOwnedEntryCount) -C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG32, ForegroundLossTime) +C_ASSERT_FIELD(KTHREAD, 0x310, UCHAR[16], PriorityFloorCounts) +C_ASSERT_FIELD(KTHREAD, 0x320, ULONG, PriorityFloorSummary) +C_ASSERT_FIELD(KTHREAD, 0x324, LONG, AbCompletedIoBoostCount) +C_ASSERT_FIELD(KTHREAD, 0x328, SHORT, KeReferenceCount) +C_ASSERT_FIELD(KTHREAD, 0x32A, UCHAR, AbOrphanedEntrySummary) +C_ASSERT_FIELD(KTHREAD, 0x32B, UCHAR, AbOwnedEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG, ForegroundLossTime) C_ASSERT_FIELD(KTHREAD, 0x330, LIST_ENTRY, GlobalForegroundListEntry) C_ASSERT_FIELD(KTHREAD, 0x330, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry) -C_ASSERT_FIELD(KTHREAD, 0x334, ULONG32, InGlobalForegroundList) -C_ASSERT_FIELD(KTHREAD, 0x338, KSCB*, QueuedScb) -C_ASSERT_FIELD(KTHREAD, 0x340, UINT64, NpxState) +C_ASSERT_FIELD(KTHREAD, 0x334, ULONG, InGlobalForegroundList) +C_ASSERT_FIELD(KTHREAD, 0x338, struct _KSCB*, QueuedScb) +C_ASSERT_FIELD(KTHREAD, 0x340, ULONG64, NpxState) diff --git a/sdk/include/ndk/tests/win2003_x64.c b/sdk/include/ndk/tests/win2003_x64.c index dbd2d1d07d..be1f6a5f1c 100644 --- a/sdk/include/ndk/tests/win2003_x64.c +++ b/sdk/include/ndk/tests/win2003_x64.c @@ -7,7 +7,9 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) @@ -17,7 +19,7 @@ C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack) C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock) C_ASSERT_FIELD(KTHREAD, 0x048, KAPC_STATE, ApcState) -C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR, ApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR[43], ApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x073, UCHAR, ApcQueueable) C_ASSERT_FIELD(KTHREAD, 0x074, UCHAR, NextProcessor) C_ASSERT_FIELD(KTHREAD, 0x075, UCHAR, DeferredProcessor) @@ -25,46 +27,46 @@ C_ASSERT_FIELD(KTHREAD, 0x076, UCHAR, AdjustReason) C_ASSERT_FIELD(KTHREAD, 0x077, CHAR, AdjustIncrement) C_ASSERT_FIELD(KTHREAD, 0x078, ULONG64, ApcQueueLock) C_ASSERT_FIELD(KTHREAD, 0x080, LONG64, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x088, KWAIT_BLOCK*, WaitBlockList) -C_ASSERT_FIELD(KTHREAD, 0x088, KGATE*, GateObject) +C_ASSERT_FIELD(KTHREAD, 0x088, PKWAIT_BLOCK, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x088, PKGATE, GateObject) C_ASSERT_FIELD(KTHREAD, 0x090, UCHAR, Alertable) C_ASSERT_FIELD(KTHREAD, 0x091, UCHAR, WaitNext) C_ASSERT_FIELD(KTHREAD, 0x092, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, Priority) C_ASSERT_FIELD(KTHREAD, 0x094, UCHAR, EnableStackSwap) C_ASSERT_FIELD(KTHREAD, 0x095, UCHAR, SwapBusy) -C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR, Alerted) +C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR[2], Alerted) C_ASSERT_FIELD(KTHREAD, 0x098, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x098, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x0A8, KQUEUE*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x0A8, PKQUEUE, Queue) C_ASSERT_FIELD(KTHREAD, 0x0B0, PVOID, Teb) C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer) -C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, TimerFill) +C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[60], TimerFill) C_ASSERT_FIELD(KTHREAD, 0x0F4, LONG, ThreadFlags) -C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK, WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill0) +C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK[4], WaitBlock) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[43], WaitBlockFill0) C_ASSERT_FIELD(KTHREAD, 0x123, UCHAR, SystemAffinityActive) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill1) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[91], WaitBlockFill1) C_ASSERT_FIELD(KTHREAD, 0x153, CHAR, PreviousMode) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill2) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[139], WaitBlockFill2) C_ASSERT_FIELD(KTHREAD, 0x183, UCHAR, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill3) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[187], WaitBlockFill3) C_ASSERT_FIELD(KTHREAD, 0x1B3, UCHAR, LargeStack) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill4) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[44], WaitBlockFill4) C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, ContextSwitches) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill5) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[92], WaitBlockFill5) C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, State) C_ASSERT_FIELD(KTHREAD, 0x155, UCHAR, NpxState) C_ASSERT_FIELD(KTHREAD, 0x156, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x157, CHAR, WaitMode) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill6) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[140], WaitBlockFill6) C_ASSERT_FIELD(KTHREAD, 0x184, ULONG, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill7) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[188], WaitBlockFill7) C_ASSERT_FIELD(KTHREAD, 0x1B4, SHORT, KernelApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1B6, SHORT, SpecialApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, CombinedApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1B8, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x1C8, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x1C8, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x1D0, PVOID, CallbackStack) C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, ServiceTable) C_ASSERT_FIELD(KTHREAD, 0x1E0, ULONG, KernelLimit) @@ -79,11 +81,11 @@ C_ASSERT_FIELD(KTHREAD, 0x1F5, CHAR, BasePriority) C_ASSERT_FIELD(KTHREAD, 0x1F6, CHAR, PriorityDecrement) C_ASSERT_FIELD(KTHREAD, 0x1F7, CHAR, Saturation) C_ASSERT_FIELD(KTHREAD, 0x1F8, ULONG64, UserAffinity) -C_ASSERT_FIELD(KTHREAD, 0x200, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x200, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x208, ULONG64, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x210, KAPC_STATE*, ApcStatePointer) +C_ASSERT_FIELD(KTHREAD, 0x210, PKAPC_STATE[2], ApcStatePointer) C_ASSERT_FIELD(KTHREAD, 0x220, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x220, UCHAR, SavedApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x220, UCHAR[43], SavedApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x24B, CHAR, FreezeCount) C_ASSERT_FIELD(KTHREAD, 0x24C, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x24D, UCHAR, UserIdealProcessor) @@ -94,19 +96,19 @@ C_ASSERT_FIELD(KTHREAD, 0x258, PVOID, StackBase) C_ASSERT_FIELD(KTHREAD, 0x260, KAPC, SuspendApc) C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill0) C_ASSERT_FIELD(KTHREAD, 0x261, CHAR, Quantum) -C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill1) +C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[3], SuspendApcFill1) C_ASSERT_FIELD(KTHREAD, 0x263, UCHAR, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill2) +C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[4], SuspendApcFill2) C_ASSERT_FIELD(KTHREAD, 0x264, ULONG, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill3) +C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[64], SuspendApcFill3) C_ASSERT_FIELD(KTHREAD, 0x2A0, PVOID, TlsArray) -C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill4) +C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[72], SuspendApcFill4) C_ASSERT_FIELD(KTHREAD, 0x2A8, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill5) +C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[83], SuspendApcFill5) C_ASSERT_FIELD(KTHREAD, 0x2B3, UCHAR, PowerState) C_ASSERT_FIELD(KTHREAD, 0x2B4, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x2B8, KSEMAPHORE, SuspendSemaphore) -C_ASSERT_FIELD(KTHREAD, 0x2B8, UCHAR, SuspendSemaphorefill) +C_ASSERT_FIELD(KTHREAD, 0x2B8, UCHAR[28], SuspendSemaphorefill) C_ASSERT_FIELD(KTHREAD, 0x2D4, ULONG, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x2D8, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x2E8, PVOID, SListFaultAddress) @@ -116,6 +118,3 @@ C_ASSERT_FIELD(KTHREAD, 0x300, LONG64, OtherOperationCount) C_ASSERT_FIELD(KTHREAD, 0x308, LONG64, ReadTransferCount) C_ASSERT_FIELD(KTHREAD, 0x310, LONG64, WriteTransferCount) C_ASSERT_FIELD(KTHREAD, 0x318, LONG64, OtherTransferCount) - - - diff --git a/sdk/include/ndk/tests/win2003_x86.c b/sdk/include/ndk/tests/win2003_x86.c index 713701bb24..ee20522091 100644 --- a/sdk/include/ndk/tests/win2003_x86.c +++ b/sdk/include/ndk/tests/win2003_x86.c @@ -7,7 +7,9 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) @@ -17,7 +19,7 @@ C_ASSERT_FIELD(KTHREAD, 0x01C, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, KernelStack) C_ASSERT_FIELD(KTHREAD, 0x024, ULONG, ThreadLock) C_ASSERT_FIELD(KTHREAD, 0x028, KAPC_STATE, ApcState) -C_ASSERT_FIELD(KTHREAD, 0x028, UCHAR, ApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x028, UCHAR[23], ApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x03F, UCHAR, ApcQueueable) C_ASSERT_FIELD(KTHREAD, 0x040, UCHAR, NextProcessor) C_ASSERT_FIELD(KTHREAD, 0x041, UCHAR, DeferredProcessor) @@ -38,29 +40,26 @@ C_ASSERT_FIELD(KTHREAD, 0x05A, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x05B, CHAR, Priority) C_ASSERT_FIELD(KTHREAD, 0x05C, UCHAR, EnableStackSwap) C_ASSERT_FIELD(KTHREAD, 0x05D, UCHAR, SwapBusy) -C_ASSERT_FIELD(KTHREAD, 0x05E, UCHAR, Alerted) +C_ASSERT_FIELD(KTHREAD, 0x05E, UCHAR[2], Alerted) C_ASSERT_FIELD(KTHREAD, 0x060, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x060, SINGLE_LIST_ENTRY, SwapListEntry) C_ASSERT_FIELD(KTHREAD, 0x068, KQUEUE*, Queue) C_ASSERT_FIELD(KTHREAD, 0x06C, ULONG, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x070, INT16, KernelApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x072, INT16, SpecialApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x070, SHORT, KernelApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x072, SHORT, SpecialApcDisable) C_ASSERT_FIELD(KTHREAD, 0x070, ULONG, CombinedApcDisable) C_ASSERT_FIELD(KTHREAD, 0x074, PVOID, Teb) C_ASSERT_FIELD(KTHREAD, 0x078, KTIMER, Timer) -C_ASSERT_FIELD(KTHREAD, 0x078, UCHAR, TimerFill) -//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, AutoAlignment) -//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, DisableBoost) -//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, ReservedFlags) +C_ASSERT_FIELD(KTHREAD, 0x078, UCHAR[40], TimerFill) C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, ThreadFlags) -C_ASSERT_FIELD(KTHREAD, 0x0A8, KWAIT_BLOCK, WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill0) +C_ASSERT_FIELD(KTHREAD, 0x0A8, KWAIT_BLOCK[4], WaitBlock) +C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR[23], WaitBlockFill0) C_ASSERT_FIELD(KTHREAD, 0x0BF, UCHAR, SystemAffinityActive) -C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill1) +C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR[47], WaitBlockFill1) C_ASSERT_FIELD(KTHREAD, 0x0D7, CHAR, PreviousMode) -C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill2) +C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR[71], WaitBlockFill2) C_ASSERT_FIELD(KTHREAD, 0x0EF, UCHAR, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill3) +C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR[95], WaitBlockFill3) C_ASSERT_FIELD(KTHREAD, 0x107, UCHAR, LargeStack) C_ASSERT_FIELD(KTHREAD, 0x108, LIST_ENTRY, QueueListEntry) C_ASSERT_FIELD(KTHREAD, 0x110, PKTRAP_FRAME, TrapFrame) @@ -77,12 +76,11 @@ C_ASSERT_FIELD(KTHREAD, 0x123, CHAR, Saturation) C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, UserAffinity) C_ASSERT_FIELD(KTHREAD, 0x128, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x12C, ULONG, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x130, PKAPC_STATE, ApcStatePointer) +C_ASSERT_FIELD(KTHREAD, 0x130, PKAPC_STATE[2], ApcStatePointer) C_ASSERT_FIELD(KTHREAD, 0x138, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x138, UCHAR, SavedApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x138, UCHAR[23], SavedApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x14F, CHAR, FreezeCount) C_ASSERT_FIELD(KTHREAD, 0x150, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x151, UCHAR, UserIdealProcessor) C_ASSERT_FIELD(KTHREAD, 0x152, UCHAR, CalloutActive) C_ASSERT_FIELD(KTHREAD, 0x153, UCHAR, Iopl) - diff --git a/sdk/include/ndk/tests/win7_x64.c b/sdk/include/ndk/tests/win7_x64.c index aa173780c1..2615a5e61a 100644 --- a/sdk/include/ndk/tests/win7_x64.c +++ b/sdk/include/ndk/tests/win7_x64.c @@ -7,10 +7,11 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ - C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, CycleTime) C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget) @@ -20,10 +21,10 @@ C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack) C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock) C_ASSERT_FIELD(KTHREAD, 0x048, KWAIT_STATUS_REGISTER, WaitRegister) C_ASSERT_FIELD(KTHREAD, 0x049, UCHAR, Running) -C_ASSERT_FIELD(KTHREAD, 0x04A, UCHAR, Alerted) +C_ASSERT_FIELD(KTHREAD, 0x04A, UCHAR[2], Alerted) // type is UCHAR[2] C_ASSERT_FIELD(KTHREAD, 0x04C, LONG, MiscFlags) C_ASSERT_FIELD(KTHREAD, 0x050, KAPC_STATE, ApcState) -C_ASSERT_FIELD(KTHREAD, 0x050, UCHAR, ApcStateFill) +//C_ASSERT_FIELD(KTHREAD, 0x050, UCHAR[23], ApcStateFill) // type is UCHAR[23] C_ASSERT_FIELD(KTHREAD, 0x07B, CHAR, Priority) C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, NextProcessor) C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, DeferredProcessor) @@ -32,30 +33,30 @@ C_ASSERT_FIELD(KTHREAD, 0x090, LONG64, WaitStatus) C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList) C_ASSERT_FIELD(KTHREAD, 0x0A0, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x0A0, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x0B0, KQUEUE*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x0B0, PKQUEUE, Queue) C_ASSERT_FIELD(KTHREAD, 0x0B8, PVOID, Teb) C_ASSERT_FIELD(KTHREAD, 0x0C0, KTIMER, Timer) C_ASSERT_FIELD(KTHREAD, 0x100, LONG, ThreadFlags) C_ASSERT_FIELD(KTHREAD, 0x104, ULONG, Spare0) -C_ASSERT_FIELD(KTHREAD, 0x108, KWAIT_BLOCK, WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill4) +//C_ASSERT_FIELD(KTHREAD, 0x108, KWAIT_BLOCK, WaitBlock) // type is KWAITBLOCK[4] +//C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill4) // type is UCHAR[44] C_ASSERT_FIELD(KTHREAD, 0x134, ULONG, ContextSwitches) -C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill5) +//(KTHREAD, 0x108, UCHAR, WaitBlockFill5) // type is UCHAR[92] C_ASSERT_FIELD(KTHREAD, 0x164, UCHAR, State) C_ASSERT_FIELD(KTHREAD, 0x165, CHAR, NpxState) C_ASSERT_FIELD(KTHREAD, 0x166, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x167, CHAR, WaitMode) -C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill6) +//C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill6) // type is UCHAR[140] C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill7) +//C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill7) C_ASSERT_FIELD(KTHREAD, 0x1B0, PVOID, TebMappedLowVa) -C_ASSERT_FIELD(KTHREAD, 0x1B8, UMS_CONTROL_BLOCK*, Ucb) -C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill8) +C_ASSERT_FIELD(KTHREAD, 0x1B8, struct _UMS_CONTROL_BLOCK*, Ucb) +//C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill8) C_ASSERT_FIELD(KTHREAD, 0x1C4, SHORT, KernelApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1C6, SHORT, SpecialApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1C4, ULONG, CombinedApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1C8, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x1D8, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x1D8, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x1E0, PVOID, FirstArgument) C_ASSERT_FIELD(KTHREAD, 0x1E8, PVOID, CallbackStack) C_ASSERT_FIELD(KTHREAD, 0x1E8, ULONG64, CallbackDepth) @@ -74,9 +75,9 @@ C_ASSERT_FIELD(KTHREAD, 0x210, KPROCESS*, Process) C_ASSERT_FIELD(KTHREAD, 0x218, GROUP_AFFINITY, Affinity) C_ASSERT_FIELD(KTHREAD, 0x228, ULONG, IdealProcessor) C_ASSERT_FIELD(KTHREAD, 0x22C, ULONG, UserIdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x230, KAPC_STATE*, ApcStatePointer) +//C_ASSERT_FIELD(KTHREAD, 0x230, KAPC_STATE*, ApcStatePointer) // type is PKAPC_STATE[2] C_ASSERT_FIELD(KTHREAD, 0x240, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x240, UCHAR, SavedApcStateFill) +//C_ASSERT_FIELD(KTHREAD, 0x240, UCHAR, SavedApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x26B, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x26C, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x26D, CHAR, Spare1) @@ -86,19 +87,19 @@ C_ASSERT_FIELD(KTHREAD, 0x278, PVOID, StackBase) C_ASSERT_FIELD(KTHREAD, 0x280, KAPC, SuspendApc) C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill0) C_ASSERT_FIELD(KTHREAD, 0x281, UCHAR, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill1) +//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill1) C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill2) +//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill2) C_ASSERT_FIELD(KTHREAD, 0x284, ULONG, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill3) +//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill3) C_ASSERT_FIELD(KTHREAD, 0x2C0, KPRCB*, WaitPrcb) -C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill4) +//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill4) C_ASSERT_FIELD(KTHREAD, 0x2C8, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill5) +//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill5) C_ASSERT_FIELD(KTHREAD, 0x2D3, UCHAR, LargeStack) C_ASSERT_FIELD(KTHREAD, 0x2D4, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x2D8, KSEMAPHORE, SuspendSemaphore) -C_ASSERT_FIELD(KTHREAD, 0x2D8, UCHAR, SuspendSemaphorefill) +//C_ASSERT_FIELD(KTHREAD, 0x2D8, UCHAR, SuspendSemaphorefill) C_ASSERT_FIELD(KTHREAD, 0x2F4, ULONG, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead) diff --git a/sdk/include/ndk/tests/win7_x86.c b/sdk/include/ndk/tests/win7_x86.c index 1c32a2872f..b35e412c46 100644 --- a/sdk/include/ndk/tests/win7_x86.c +++ b/sdk/include/ndk/tests/win7_x86.c @@ -7,7 +7,9 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) @@ -20,10 +22,10 @@ C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, KernelStack) C_ASSERT_FIELD(KTHREAD, 0x034, ULONG, ThreadLock) C_ASSERT_FIELD(KTHREAD, 0x038, KWAIT_STATUS_REGISTER, WaitRegister) C_ASSERT_FIELD(KTHREAD, 0x039, UCHAR, Running) -C_ASSERT_FIELD(KTHREAD, 0x03A, UCHAR, Alerted) +C_ASSERT_FIELD(KTHREAD, 0x03A, UCHAR[2], Alerted) C_ASSERT_FIELD(KTHREAD, 0x03C, LONG, MiscFlags) C_ASSERT_FIELD(KTHREAD, 0x040, KAPC_STATE, ApcState) -C_ASSERT_FIELD(KTHREAD, 0x040, UCHAR, ApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x040, UCHAR[23], ApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x057, CHAR, Priority) C_ASSERT_FIELD(KTHREAD, 0x058, ULONG, NextProcessor) C_ASSERT_FIELD(KTHREAD, 0x05C, ULONG, DeferredProcessor) @@ -34,10 +36,10 @@ C_ASSERT_FIELD(KTHREAD, 0x069, CHAR, NpxState) C_ASSERT_FIELD(KTHREAD, 0x06A, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x06B, CHAR, WaitMode) C_ASSERT_FIELD(KTHREAD, 0x06C, LONG, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_BLOCK*, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x070, PKWAIT_BLOCK, WaitBlockList) C_ASSERT_FIELD(KTHREAD, 0x074, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x074, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x07C, KQUEUE*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x07C, PKQUEUE, Queue) C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, WaitTime) C_ASSERT_FIELD(KTHREAD, 0x084, SHORT, KernelApcDisable) C_ASSERT_FIELD(KTHREAD, 0x086, SHORT, SpecialApcDisable) @@ -46,9 +48,9 @@ C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, Teb) C_ASSERT_FIELD(KTHREAD, 0x090, KTIMER, Timer) C_ASSERT_FIELD(KTHREAD, 0x0B8, LONG, ThreadFlags) C_ASSERT_FIELD(KTHREAD, 0x0BC, PVOID, ServiceTable) -C_ASSERT_FIELD(KTHREAD, 0x0C0, KWAIT_BLOCK, WaitBlock) +C_ASSERT_FIELD(KTHREAD, 0x0C0, KWAIT_BLOCK[4], WaitBlock) C_ASSERT_FIELD(KTHREAD, 0x120, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x128, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x128, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x12C, PVOID, FirstArgument) C_ASSERT_FIELD(KTHREAD, 0x130, PVOID, CallbackStack) C_ASSERT_FIELD(KTHREAD, 0x130, ULONG, CallbackDepth) @@ -63,13 +65,13 @@ C_ASSERT_FIELD(KTHREAD, 0x13B, CHAR, Saturation) C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, SystemCallNumber) C_ASSERT_FIELD(KTHREAD, 0x140, ULONG, FreezeCount) C_ASSERT_FIELD(KTHREAD, 0x144, GROUP_AFFINITY, UserAffinity) -C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x150, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, Affinity) C_ASSERT_FIELD(KTHREAD, 0x160, ULONG, IdealProcessor) C_ASSERT_FIELD(KTHREAD, 0x164, ULONG, UserIdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x168, KAPC_STATE*, ApcStatePointer) +C_ASSERT_FIELD(KTHREAD, 0x168, PKAPC_STATE[2], ApcStatePointer) C_ASSERT_FIELD(KTHREAD, 0x170, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x170, UCHAR, SavedApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x170, UCHAR[23], SavedApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x187, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x188, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x189, CHAR, Spare1) @@ -79,19 +81,19 @@ C_ASSERT_FIELD(KTHREAD, 0x190, PVOID, StackBase) C_ASSERT_FIELD(KTHREAD, 0x194, KAPC, SuspendApc) C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill0) C_ASSERT_FIELD(KTHREAD, 0x195, UCHAR, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill1) +C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[3], SuspendApcFill1) C_ASSERT_FIELD(KTHREAD, 0x197, UCHAR, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill2) +C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[4], SuspendApcFill2) C_ASSERT_FIELD(KTHREAD, 0x198, ULONG, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill3) -C_ASSERT_FIELD(KTHREAD, 0x1B8, KPRCB*, WaitPrcb) -C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill4) +C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[36], SuspendApcFill3) +C_ASSERT_FIELD(KTHREAD, 0x1B8, PKPRCB, WaitPrcb) +C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[40], SuspendApcFill4) C_ASSERT_FIELD(KTHREAD, 0x1BC, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill5) +C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[47], SuspendApcFill5) C_ASSERT_FIELD(KTHREAD, 0x1C3, UCHAR, LargeStack) C_ASSERT_FIELD(KTHREAD, 0x1C4, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x1C8, KSEMAPHORE, SuspendSemaphore) -C_ASSERT_FIELD(KTHREAD, 0x1C8, UCHAR, SuspendSemaphorefill) +C_ASSERT_FIELD(KTHREAD, 0x1C8, UCHAR[20], SuspendSemaphorefill) C_ASSERT_FIELD(KTHREAD, 0x1DC, ULONG, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x1E0, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x1E8, LIST_ENTRY, MutantListHead) diff --git a/sdk/include/ndk/tests/win81_x64.c b/sdk/include/ndk/tests/win81_x64.c index c75ec1e86d..569c788c60 100644 --- a/sdk/include/ndk/tests/win81_x64.c +++ b/sdk/include/ndk/tests/win81_x64.c @@ -7,108 +7,132 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress) -C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget) +C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget) C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack) C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase) -C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock) -C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime) -C_ASSERT_FIELD(KTHREAD, 0x050, ULONG32, CurrentRunTime) -C_ASSERT_FIELD(KTHREAD, 0x054, ULONG32, ExpectedRunTime) +C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock) +C_ASSERT_FIELD(KTHREAD, 0x048, ULONG64, CycleTime) +C_ASSERT_FIELD(KTHREAD, 0x050, ULONG, CurrentRunTime) +C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ExpectedRunTime) C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack) -C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea) -C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup) +C_ASSERT_FIELD(KTHREAD, 0x060, PXSAVE_FORMAT, StateSaveArea) +C_ASSERT_FIELD(KTHREAD, 0x068, struct _KSCHEDULING_GROUP*, SchedulingGroup) C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister) -C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running) +C_ASSERT_FIELD(KTHREAD, 0x071, CHAR, Running) C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted) -C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags) -C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags) -C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG32, Spare0) -C_ASSERT_FIELD(KTHREAD, 0x080, ULONG32, SystemCallNumber) -C_ASSERT_FIELD(KTHREAD, 0x084, ULONG32, Spare1) +C_ASSERT_FIELD(KTHREAD, 0x074, LONG, MiscFlags) +C_ASSERT_FIELD(KTHREAD, 0x078, LONG, ThreadFlags) +C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, Spare0) +C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, SystemCallNumber) +C_ASSERT_FIELD(KTHREAD, 0x084, ULONG, Spare1) C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument) -C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x090, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState) C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority) -C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG32, UserIdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG, UserIdealProcessor) +C_ASSERT_FIELD(KTHREAD, 0x0C8, LONG64, WaitStatus) +C_ASSERT_FIELD(KTHREAD, 0x0D0, PKWAIT_BLOCK, WaitBlockList) C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x0E8, DISPATCHER_HEADER*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x0E8, PDISPATCHER_HEADER, Queue) C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias) +C_ASSERT_FIELD(KTHREAD, 0x0F8, ULONG64, RelativeTimerBias) C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer) C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x154, ULONG32, ContextSwitches) -C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State) +C_ASSERT_FIELD(KTHREAD, 0x154, ULONG, ContextSwitches) +C_ASSERT_FIELD(KTHREAD, 0x184, UCHAR, State) C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, NpxState) -C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql) +C_ASSERT_FIELD(KTHREAD, 0x186, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode) -C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG32, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG32, CombinedApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters) -C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave) +C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, WaitTime) +C_ASSERT_FIELD(KTHREAD, 0x1E4, SHORT, KernelApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x1E6, SHORT, SpecialApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG, CombinedApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x168, PKTHREAD_COUNTERS, ThreadCounters) +C_ASSERT_FIELD(KTHREAD, 0x198, PXSTATE_SAVE, XStateSave) C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread) -C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb) -C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch) +C_ASSERT_FIELD(KTHREAD, 0x1F0, struct _UMS_CONTROL_BLOCK*, Ucb) +C_ASSERT_FIELD(KTHREAD, 0x1F8, struct _KUMS_CONTEXT_HEADER*, Uch) C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa) C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x218, ULONG32, NextProcessor) -C_ASSERT_FIELD(KTHREAD, 0x21C, LONG32, QueuePriority) -C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x218, ULONG, NextProcessor) +C_ASSERT_FIELD(KTHREAD, 0x21C, LONG, QueuePriority) +C_ASSERT_FIELD(KTHREAD, 0x220, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity) C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode) C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority) C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement) -C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted) -C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason) +C_ASSERT_FIELD(KTHREAD, 0x235, UCHAR, Preempted) +C_ASSERT_FIELD(KTHREAD, 0x236, UCHAR, AdjustReason) C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement) C_ASSERT_FIELD(KTHREAD, 0x238, GROUP_AFFINITY, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x242, UINT8, ApcStateIndex) -C_ASSERT_FIELD(KTHREAD, 0x243, UINT8, WaitBlockCount) -C_ASSERT_FIELD(KTHREAD, 0x244, ULONG32, IdealProcessor) +C_ASSERT_FIELD(KTHREAD, 0x242, UCHAR, ApcStateIndex) +C_ASSERT_FIELD(KTHREAD, 0x243, UCHAR, WaitBlockCount) +C_ASSERT_FIELD(KTHREAD, 0x244, ULONG, IdealProcessor) C_ASSERT_FIELD(KTHREAD, 0x248, KAPC_STATE*[2], ApcStatePointer) C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason) +C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation) -C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount) +C_ASSERT_FIELD(KTHREAD, 0x286, USHORT, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc) -C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG32, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb) +C_ASSERT_FIELD(KTHREAD, 0x289, UCHAR, ResourceIndex) +C_ASSERT_FIELD(KTHREAD, 0x28B, UCHAR, QuantumReset) +C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG, KernelTime) +C_ASSERT_FIELD(KTHREAD, 0x2C8, PKPRCB, WaitPrcb) C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel) -C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG32, UserTime) +C_ASSERT_FIELD(KTHREAD, 0x2DB, UCHAR, CallbackNestingLevel) +C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent) C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead) C_ASSERT_FIELD(KTHREAD, 0x318, SINGLE_LIST_ENTRY, LockEntriesFreeList) +#if (NTDDI_VERSION < 0x06032580) +C_ASSERT_FIELD(KTHREAD, 0x320, KLOCK_ENTRY[5], LockEntries) +C_ASSERT_FIELD(KTHREAD, 0x500, SINGLE_LIST_ENTRY, PropagateBoostsEntry) +C_ASSERT_FIELD(KTHREAD, 0x508, SINGLE_LIST_ENTRY, IoSelfBoostsEntry) +C_ASSERT_FIELD(KTHREAD, 0x510, UINT8[16], PriorityFloorCounts) +C_ASSERT_FIELD(KTHREAD, 0x520, ULONG, PriorityFloorSummary) +C_ASSERT_FIELD(KTHREAD, 0x524, LONG, AbCompletedIoBoostCount) +C_ASSERT_FIELD(KTHREAD, 0x528, SHORT, AbReferenceCount) +C_ASSERT_FIELD(KTHREAD, 0x52A, UCHAR, AbFreeEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x52B, UCHAR, AbWaitEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x52C, ULONG, ForegroundLossTime) +C_ASSERT_FIELD(KTHREAD, 0x530, LIST_ENTRY, GlobalForegroundListEntry) +C_ASSERT_FIELD(KTHREAD, 0x530, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry) +C_ASSERT_FIELD(KTHREAD, 0x538, ULONG64, InGlobalForegroundList) +C_ASSERT_FIELD(KTHREAD, 0x540, LONG64, ReadOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x548, LONG64, WriteOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x550, LONG64, OtherOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x558, LONG64, ReadTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x560, LONG64, WriteTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x568, LONG64, OtherTransferCount) +#else C_ASSERT_FIELD(KTHREAD, 0x320, KLOCK_ENTRY[6], LockEntries) C_ASSERT_FIELD(KTHREAD, 0x560, SINGLE_LIST_ENTRY, PropagateBoostsEntry) C_ASSERT_FIELD(KTHREAD, 0x568, SINGLE_LIST_ENTRY, IoSelfBoostsEntry) C_ASSERT_FIELD(KTHREAD, 0x570, UINT8[16], PriorityFloorCounts) -C_ASSERT_FIELD(KTHREAD, 0x580, ULONG32, PriorityFloorSummary) -C_ASSERT_FIELD(KTHREAD, 0x584, LONG32, AbCompletedIoBoostCount) -C_ASSERT_FIELD(KTHREAD, 0x588, INT16, AbReferenceCount) -C_ASSERT_FIELD(KTHREAD, 0x58A, UINT8, AbFreeEntryCount) -C_ASSERT_FIELD(KTHREAD, 0x58B, UINT8, AbWaitEntryCount) -C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG32, ForegroundLossTime) +C_ASSERT_FIELD(KTHREAD, 0x580, ULONG, PriorityFloorSummary) +C_ASSERT_FIELD(KTHREAD, 0x584, LONG, AbCompletedIoBoostCount) +C_ASSERT_FIELD(KTHREAD, 0x588, SHORT, AbReferenceCount) +C_ASSERT_FIELD(KTHREAD, 0x58A, UCHAR, AbFreeEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x58B, UCHAR, AbWaitEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG, ForegroundLossTime) C_ASSERT_FIELD(KTHREAD, 0x590, LIST_ENTRY, GlobalForegroundListEntry) C_ASSERT_FIELD(KTHREAD, 0x590, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry) -C_ASSERT_FIELD(KTHREAD, 0x598, UINT64, InGlobalForegroundList) -C_ASSERT_FIELD(KTHREAD, 0x5A0, INT64, ReadOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x5A8, INT64, WriteOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x5B0, INT64, OtherOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x5B8, INT64, ReadTransferCount) -C_ASSERT_FIELD(KTHREAD, 0x5C0, INT64, WriteTransferCount) -C_ASSERT_FIELD(KTHREAD, 0x5C8, INT64, OtherTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x598, ULONG64, InGlobalForegroundList) +C_ASSERT_FIELD(KTHREAD, 0x5A0, LONG64, ReadOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x5A8, LONG64, WriteOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x5B0, LONG64, OtherOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x5B8, LONG64, ReadTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x5C0, LONG64, WriteTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x5C8, LONG64, OtherTransferCount) +#endif diff --git a/sdk/include/ndk/tests/win81_x86.c b/sdk/include/ndk/tests/win81_x86.c index 114a96337b..b76ad8691f 100644 --- a/sdk/include/ndk/tests/win81_x86.c +++ b/sdk/include/ndk/tests/win81_x86.c @@ -7,87 +7,104 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); + +C_ASSERT(sizeof(KLOCK_ENTRY_LOCK_STATE) == 0x008); +C_ASSERT_FIELD(KLOCK_ENTRY, 0x000, RTL_BALANCED_NODE, TreeNode) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x00C, PVOID, ThreadUnsafe) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x00D, UCHAR[2], Reserved1) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x00F, UCHAR, AcquiredByte) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x010, UCHAR, WaitingAndBusyByte) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x011, UCHAR[2], Reserved) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x013, UCHAR, InTreeByte) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x014, PVOID, SessionState) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x014, ULONG, SessionId) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x018, RTL_RB_TREE, OwnerTree) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x018, CHAR, CpuPriorityKey) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x020, RTL_RB_TREE, WaiterTree) +C_ASSERT_FIELD(KLOCK_ENTRY, 0x028, ULONG, EntryLock) +C_ASSERT(sizeof(KLOCK_ENTRY) == 0x030); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) - C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress) -C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget) +C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, QuantumTarget) C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack) C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase) -C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG32, ThreadLock) -C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime) -C_ASSERT_FIELD(KTHREAD, 0x038, ULONG32, HighCycleTime) +C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG, ThreadLock) +C_ASSERT_FIELD(KTHREAD, 0x030, ULONG64, CycleTime) +C_ASSERT_FIELD(KTHREAD, 0x038, ULONG, HighCycleTime) C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable) -C_ASSERT_FIELD(KTHREAD, 0x040, ULONG32, CurrentRunTime) -C_ASSERT_FIELD(KTHREAD, 0x044, ULONG32, ExpectedRunTime) +C_ASSERT_FIELD(KTHREAD, 0x040, ULONG, CurrentRunTime) +C_ASSERT_FIELD(KTHREAD, 0x044, ULONG, ExpectedRunTime) C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack) -C_ASSERT_FIELD(KTHREAD, 0x04C, XSAVE_FORMAT*, StateSaveArea) -C_ASSERT_FIELD(KTHREAD, 0x050, KSCHEDULING_GROUP*, SchedulingGroup) +C_ASSERT_FIELD(KTHREAD, 0x04C, PXSAVE_FORMAT, StateSaveArea) +C_ASSERT_FIELD(KTHREAD, 0x050, struct _KSCHEDULING_GROUP*, SchedulingGroup) C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister) -C_ASSERT_FIELD(KTHREAD, 0x055, UINT8, Running) -C_ASSERT_FIELD(KTHREAD, 0x056, UINT8[2], Alerted) -C_ASSERT_FIELD(KTHREAD, 0x058, LONG32, MiscFlags) -C_ASSERT_FIELD(KTHREAD, 0x05C, LONG32, ThreadFlags) -C_ASSERT_FIELD(KTHREAD, 0x060, ULONG32, Spare0) -C_ASSERT_FIELD(KTHREAD, 0x064, ULONG32, SystemCallNumber) +C_ASSERT_FIELD(KTHREAD, 0x055, UCHAR, Running) +C_ASSERT_FIELD(KTHREAD, 0x056, UCHAR[2], Alerted) +C_ASSERT_FIELD(KTHREAD, 0x058, LONG, MiscFlags) +C_ASSERT_FIELD(KTHREAD, 0x05C, LONG, ThreadFlags) +C_ASSERT_FIELD(KTHREAD, 0x060, ULONG, Spare0) +C_ASSERT_FIELD(KTHREAD, 0x064, ULONG, SystemCallNumber) C_ASSERT_FIELD(KTHREAD, 0x068, PVOID, FirstArgument) -C_ASSERT_FIELD(KTHREAD, 0x06C, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x06C, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x070, KAPC_STATE, ApcState) C_ASSERT_FIELD(KTHREAD, 0x087, CHAR, Priority) -C_ASSERT_FIELD(KTHREAD, 0x088, ULONG32, UserIdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG32, ContextSwitches) -C_ASSERT_FIELD(KTHREAD, 0x090, UINT8, State) +C_ASSERT_FIELD(KTHREAD, 0x088, ULONG, UserIdealProcessor) +C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG, ContextSwitches) +C_ASSERT_FIELD(KTHREAD, 0x090, UCHAR, State) C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, NpxState) -C_ASSERT_FIELD(KTHREAD, 0x092, UINT8, WaitIrql) +C_ASSERT_FIELD(KTHREAD, 0x092, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, WaitMode) -C_ASSERT_FIELD(KTHREAD, 0x094, LONG32, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x094, LONG, WaitStatus) +C_ASSERT_FIELD(KTHREAD, 0x098, PKWAIT_BLOCK, WaitBlockList) C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x0A4, DISPATCHER_HEADER*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x0A4, PDISPATCHER_HEADER, Queue) C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb) -C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias) +C_ASSERT_FIELD(KTHREAD, 0x0B0, ULONG64, RelativeTimerBias) C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer) C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x0F4, KTHREAD_COUNTERS*, ThreadCounters) -C_ASSERT_FIELD(KTHREAD, 0x10C, XSTATE_SAVE*, XStateSave) +C_ASSERT_FIELD(KTHREAD, 0x0F4, PKTHREAD_COUNTERS, ThreadCounters) +C_ASSERT_FIELD(KTHREAD, 0x10C, PXSTATE_SAVE, XStateSave) C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, Win32Thread) -C_ASSERT_FIELD(KTHREAD, 0x138, ULONG32, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x13C, INT16, KernelApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x13E, INT16, SpecialApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG32, CombinedApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x138, ULONG, WaitTime) +C_ASSERT_FIELD(KTHREAD, 0x13C, SHORT, KernelApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x13E, SHORT, SpecialApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, CombinedApcDisable) C_ASSERT_FIELD(KTHREAD, 0x140, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x148, ULONG32, NextProcessor) -C_ASSERT_FIELD(KTHREAD, 0x14C, LONG32, QueuePriority) -C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, NextProcessor) +C_ASSERT_FIELD(KTHREAD, 0x14C, LONG, QueuePriority) +C_ASSERT_FIELD(KTHREAD, 0x150, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, UserAffinity) C_ASSERT_FIELD(KTHREAD, 0x15A, CHAR, PreviousMode) C_ASSERT_FIELD(KTHREAD, 0x15B, CHAR, BasePriority) C_ASSERT_FIELD(KTHREAD, 0x15C, CHAR, PriorityDecrement) -C_ASSERT_FIELD(KTHREAD, 0x15D, UINT8, Preempted) -C_ASSERT_FIELD(KTHREAD, 0x15E, UINT8, AdjustReason) +C_ASSERT_FIELD(KTHREAD, 0x15D, UCHAR, Preempted) +C_ASSERT_FIELD(KTHREAD, 0x15E, UCHAR, AdjustReason) C_ASSERT_FIELD(KTHREAD, 0x15F, CHAR, AdjustIncrement) C_ASSERT_FIELD(KTHREAD, 0x160, GROUP_AFFINITY, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x166, UINT8, ApcStateIndex) -C_ASSERT_FIELD(KTHREAD, 0x167, UINT8, WaitBlockCount) -C_ASSERT_FIELD(KTHREAD, 0x168, ULONG32, IdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x16C, KAPC_STATE*[2], ApcStatePointer) +C_ASSERT_FIELD(KTHREAD, 0x166, UCHAR, ApcStateIndex) +C_ASSERT_FIELD(KTHREAD, 0x167, UCHAR, WaitBlockCount) +C_ASSERT_FIELD(KTHREAD, 0x168, ULONG, IdealProcessor) +C_ASSERT_FIELD(KTHREAD, 0x16C, PKAPC_STATE[2], ApcStatePointer) C_ASSERT_FIELD(KTHREAD, 0x174, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x18B, UINT8, WaitReason) +C_ASSERT_FIELD(KTHREAD, 0x18B, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x18C, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x18D, CHAR, Saturation) -C_ASSERT_FIELD(KTHREAD, 0x18E, UINT16, SListFaultCount) +C_ASSERT_FIELD(KTHREAD, 0x18E, USHORT, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x190, KAPC, SchedulerApc) -C_ASSERT_FIELD(KTHREAD, 0x191, UINT8, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x193, UINT8, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x194, ULONG32, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x1B4, KPRCB*, WaitPrcb) +C_ASSERT_FIELD(KTHREAD, 0x191, UCHAR, ResourceIndex) +C_ASSERT_FIELD(KTHREAD, 0x193, UCHAR, QuantumReset) +C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, KernelTime) +C_ASSERT_FIELD(KTHREAD, 0x1B4, PKPRCB, WaitPrcb) C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x1BF, UINT8, CallbackNestingLevel) -C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime) +C_ASSERT_FIELD(KTHREAD, 0x1BF, UCHAR, CallbackNestingLevel) +C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent) C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead) @@ -95,13 +112,13 @@ C_ASSERT_FIELD(KTHREAD, 0x1E4, SINGLE_LIST_ENTRY, LockEntriesFreeList) C_ASSERT_FIELD(KTHREAD, 0x1E8, KLOCK_ENTRY[6], LockEntries) C_ASSERT_FIELD(KTHREAD, 0x308, SINGLE_LIST_ENTRY, PropagateBoostsEntry) C_ASSERT_FIELD(KTHREAD, 0x30C, SINGLE_LIST_ENTRY, IoSelfBoostsEntry) -C_ASSERT_FIELD(KTHREAD, 0x310, UINT8[16], PriorityFloorCounts) -C_ASSERT_FIELD(KTHREAD, 0x320, ULONG32, PriorityFloorSummary) -C_ASSERT_FIELD(KTHREAD, 0x324, LONG32, AbCompletedIoBoostCount) -C_ASSERT_FIELD(KTHREAD, 0x328, INT16, AbReferenceCount) -C_ASSERT_FIELD(KTHREAD, 0x32A, UINT8, AbFreeEntryCount) -C_ASSERT_FIELD(KTHREAD, 0x32B, UINT8, AbWaitEntryCount) -C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG32, ForegroundLossTime) +C_ASSERT_FIELD(KTHREAD, 0x310, UCHAR[16], PriorityFloorCounts) +C_ASSERT_FIELD(KTHREAD, 0x320, ULONG, PriorityFloorSummary) +C_ASSERT_FIELD(KTHREAD, 0x324, LONG, AbCompletedIoBoostCount) +C_ASSERT_FIELD(KTHREAD, 0x328, SHORT, AbReferenceCount) +C_ASSERT_FIELD(KTHREAD, 0x32A, UCHAR, AbFreeEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x32B, UCHAR, AbWaitEntryCount) +C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG, ForegroundLossTime) C_ASSERT_FIELD(KTHREAD, 0x330, LIST_ENTRY, GlobalForegroundListEntry) C_ASSERT_FIELD(KTHREAD, 0x330, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry) -C_ASSERT_FIELD(KTHREAD, 0x334, ULONG32, InGlobalForegroundList) +C_ASSERT_FIELD(KTHREAD, 0x334, ULONG, InGlobalForegroundList) diff --git a/sdk/include/ndk/tests/win8_x64.c b/sdk/include/ndk/tests/win8_x64.c index 2f45bba390..67211263f1 100644 --- a/sdk/include/ndk/tests/win8_x64.c +++ b/sdk/include/ndk/tests/win8_x64.c @@ -7,94 +7,96 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress) -C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget) +C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget) C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack) C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase) -C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock) -C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime) +C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock) +C_ASSERT_FIELD(KTHREAD, 0x048, ULONG64, CycleTime) C_ASSERT_FIELD(KTHREAD, 0x050, ULONG, CurrentRunTime) C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ExpectedRunTime) C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack) -C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea) -C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup) +C_ASSERT_FIELD(KTHREAD, 0x060, PXSAVE_FORMAT, StateSaveArea) +C_ASSERT_FIELD(KTHREAD, 0x068, struct _KSCHEDULING_GROUP*, SchedulingGroup) C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister) -C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running) +C_ASSERT_FIELD(KTHREAD, 0x071, BOOLEAN, Running) C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted) -C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags) -C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags) +C_ASSERT_FIELD(KTHREAD, 0x074, LONG, MiscFlags) +C_ASSERT_FIELD(KTHREAD, 0x078, LONG, ThreadFlags) C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, Spare0) C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, SystemCallNumber) C_ASSERT_FIELD(KTHREAD, 0x084, ULONG, Spare1) C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument) -C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x090, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState) C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority) C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG, UserIdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x0C8, LONG64, WaitStatus) +C_ASSERT_FIELD(KTHREAD, 0x0D0, PKWAIT_BLOCK, WaitBlockList) C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x0E8, KQUEUE*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x0E8, PKQUEUE, Queue) C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias) +C_ASSERT_FIELD(KTHREAD, 0x0F8, ULONG64, RelativeTimerBias) C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer) C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock) C_ASSERT_FIELD(KTHREAD, 0x154, ULONG, ContextSwitches) -C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State) +C_ASSERT_FIELD(KTHREAD, 0x184, UCHAR, State) C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, NpxState) -C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql) +C_ASSERT_FIELD(KTHREAD, 0x186, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode) C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x1E4, SHORT, KernelApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x1E6, SHORT, SpecialApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG, CombinedApcDisable) C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters) -C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave) +C_ASSERT_FIELD(KTHREAD, 0x198, PXSTATE_SAVE, XStateSave) C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread) -C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb) -C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch) +C_ASSERT_FIELD(KTHREAD, 0x1F0, struct _UMS_CONTROL_BLOCK*, Ucb) +C_ASSERT_FIELD(KTHREAD, 0x1F8, struct _KUMS_CONTEXT_HEADER*, Uch) C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa) C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry) C_ASSERT_FIELD(KTHREAD, 0x218, ULONG, NextProcessor) C_ASSERT_FIELD(KTHREAD, 0x21C, ULONG, DeferredProcessor) -C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x220, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity) C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode) C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority) C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement) -C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted) -C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason) +C_ASSERT_FIELD(KTHREAD, 0x235, UCHAR, Preempted) +C_ASSERT_FIELD(KTHREAD, 0x236, UCHAR, AdjustReason) C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement) C_ASSERT_FIELD(KTHREAD, 0x238, GROUP_AFFINITY, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x242, UINT8, ApcStateIndex) -C_ASSERT_FIELD(KTHREAD, 0x243, UINT8, WaitBlockCount) +C_ASSERT_FIELD(KTHREAD, 0x242, UCHAR, ApcStateIndex) +C_ASSERT_FIELD(KTHREAD, 0x243, UCHAR, WaitBlockCount) C_ASSERT_FIELD(KTHREAD, 0x244, ULONG, IdealProcessor) C_ASSERT_FIELD(KTHREAD, 0x248, KAPC_STATE*[2], ApcStatePointer) C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason) +C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation) -C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount) +C_ASSERT_FIELD(KTHREAD, 0x286, USHORT, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc) -C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset) +C_ASSERT_FIELD(KTHREAD, 0x289, UCHAR, ResourceIndex) +C_ASSERT_FIELD(KTHREAD, 0x28B, UCHAR, QuantumReset) C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb) +C_ASSERT_FIELD(KTHREAD, 0x2C8, PKPRCB, WaitPrcb) C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel) +C_ASSERT_FIELD(KTHREAD, 0x2DB, UCHAR, CallbackNestingLevel) C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent) C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead) -C_ASSERT_FIELD(KTHREAD, 0x318, INT64, ReadOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x320, INT64, WriteOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x328, INT64, OtherOperationCount) -C_ASSERT_FIELD(KTHREAD, 0x330, INT64, ReadTransferCount) -C_ASSERT_FIELD(KTHREAD, 0x338, INT64, WriteTransferCount) -C_ASSERT_FIELD(KTHREAD, 0x340, INT64, OtherTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x318, LONG64, ReadOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x320, LONG64, WriteOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x328, LONG64, OtherOperationCount) +C_ASSERT_FIELD(KTHREAD, 0x330, LONG64, ReadTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x338, LONG64, WriteTransferCount) +C_ASSERT_FIELD(KTHREAD, 0x340, LONG64, OtherTransferCount) diff --git a/sdk/include/ndk/tests/win8_x86.c b/sdk/include/ndk/tests/win8_x86.c index c8efe705f8..8a8de9a447 100644 --- a/sdk/include/ndk/tests/win8_x86.c +++ b/sdk/include/ndk/tests/win8_x86.c @@ -7,24 +7,26 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) -C_ASSERT_FIELD(KTHREAD, 0x010, UINT64, SListFaultAddress) -C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget) +C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress) +C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, QuantumTarget) C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack) C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase) -C_ASSERT_FIELD(KTHREAD, 0x02C, PVOID, ThreadLock) -C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime) +C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG, ThreadLock) +C_ASSERT_FIELD(KTHREAD, 0x030, ULONG64, CycleTime) C_ASSERT_FIELD(KTHREAD, 0x038, ULONG, HighCycleTime) C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable) C_ASSERT_FIELD(KTHREAD, 0x040, ULONG, CurrentRunTime) C_ASSERT_FIELD(KTHREAD, 0x044, ULONG, ExpectedRunTime) C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack) C_ASSERT_FIELD(KTHREAD, 0x04C, PXSAVE_FORMAT, StateSaveArea) -C_ASSERT_FIELD(KTHREAD, 0x050, PKSCHEDULING_GROUP, SchedulingGroup) +C_ASSERT_FIELD(KTHREAD, 0x050, struct _KSCHEDULING_GROUP*, SchedulingGroup) C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister) C_ASSERT_FIELD(KTHREAD, 0x055, UCHAR, Running) C_ASSERT_FIELD(KTHREAD, 0x056, UCHAR[2], Alerted) @@ -48,7 +50,7 @@ C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry) C_ASSERT_FIELD(KTHREAD, 0x0A4, PKQUEUE, Queue) C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb) -C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias) +C_ASSERT_FIELD(KTHREAD, 0x0B0, ULONG64, RelativeTimerBias) C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer) C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock) C_ASSERT_FIELD(KTHREAD, 0x0F4, PKTHREAD_COUNTERS, ThreadCounters) @@ -85,7 +87,7 @@ C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, KernelTime) C_ASSERT_FIELD(KTHREAD, 0x1B4, PKPRCB, WaitPrcb) C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData) C_ASSERT_FIELD(KTHREAD, 0x1BF, UCHAR, CallbackNestingLevel) -C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime) +C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent) C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead) diff --git a/sdk/include/ndk/tests/winvista_x64.c b/sdk/include/ndk/tests/winvista_x64.c index c369530927..cb1123d9a4 100644 --- a/sdk/include/ndk/tests/winvista_x64.c +++ b/sdk/include/ndk/tests/winvista_x64.c @@ -7,7 +7,9 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) @@ -18,49 +20,49 @@ C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack) C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock) C_ASSERT_FIELD(KTHREAD, 0x048, KAPC_STATE, ApcState) -C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR, ApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR[43], ApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x073, CHAR, Priority) C_ASSERT_FIELD(KTHREAD, 0x074, USHORT, NextProcessor) C_ASSERT_FIELD(KTHREAD, 0x076, USHORT, DeferredProcessor) C_ASSERT_FIELD(KTHREAD, 0x078, ULONG64, ApcQueueLock) C_ASSERT_FIELD(KTHREAD, 0x080, LONG64, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x088, KWAIT_BLOCK*, WaitBlockList) -C_ASSERT_FIELD(KTHREAD, 0x088, KGATE*, GateObject) +C_ASSERT_FIELD(KTHREAD, 0x088, PKWAIT_BLOCK, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x088, PKGATE, GateObject) C_ASSERT_FIELD(KTHREAD, 0x090, LONG, MiscFlags) C_ASSERT_FIELD(KTHREAD, 0x094, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x095, UCHAR, SwapBusy) -C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR, Alerted) +C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR[2], Alerted) C_ASSERT_FIELD(KTHREAD, 0x098, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x098, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x0A8, KQUEUE*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x0A8, PKQUEUE, Queue) C_ASSERT_FIELD(KTHREAD, 0x0B0, PVOID, Teb) C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer) -C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, TimerFill) +C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[60], TimerFill) C_ASSERT_FIELD(KTHREAD, 0x0F4, LONG, ThreadFlags) -C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK, WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill0) +C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK[4], WaitBlock) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[43], WaitBlockFill0) C_ASSERT_FIELD(KTHREAD, 0x123, UCHAR, IdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill1) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[91], WaitBlockFill1) C_ASSERT_FIELD(KTHREAD, 0x153, CHAR, PreviousMode) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill2) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[139], WaitBlockFill2) C_ASSERT_FIELD(KTHREAD, 0x183, UCHAR, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill3) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[187], WaitBlockFill3) C_ASSERT_FIELD(KTHREAD, 0x1B3, UCHAR, LargeStack) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill4) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[44], WaitBlockFill4) C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, ContextSwitches) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill5) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[92], WaitBlockFill5) C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, State) C_ASSERT_FIELD(KTHREAD, 0x155, UCHAR, NpxState) C_ASSERT_FIELD(KTHREAD, 0x156, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x157, CHAR, WaitMode) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill6) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[140], WaitBlockFill6) C_ASSERT_FIELD(KTHREAD, 0x184, ULONG, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill7) +C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[188], WaitBlockFill7) C_ASSERT_FIELD(KTHREAD, 0x1B4, SHORT, KernelApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1B6, SHORT, SpecialApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, CombinedApcDisable) C_ASSERT_FIELD(KTHREAD, 0x1B8, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x1C8, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x1C8, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x1D0, PVOID, FirstArgument) C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, CallbackStack) C_ASSERT_FIELD(KTHREAD, 0x1D8, ULONG64, CallbackDepth) @@ -75,11 +77,11 @@ C_ASSERT_FIELD(KTHREAD, 0x1E7, CHAR, Saturation) C_ASSERT_FIELD(KTHREAD, 0x1E8, ULONG, SystemCallNumber) C_ASSERT_FIELD(KTHREAD, 0x1EC, ULONG, Spare02) C_ASSERT_FIELD(KTHREAD, 0x1F0, ULONG64, UserAffinity) -C_ASSERT_FIELD(KTHREAD, 0x1F8, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x1F8, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x200, ULONG64, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x208, KAPC_STATE*, ApcStatePointer) +C_ASSERT_FIELD(KTHREAD, 0x208, PKAPC_STATE[2], ApcStatePointer) C_ASSERT_FIELD(KTHREAD, 0x218, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x218, UCHAR, SavedApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x218, UCHAR[43], SavedApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x243, CHAR, FreezeCount) C_ASSERT_FIELD(KTHREAD, 0x244, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x245, UCHAR, UserIdealProcessor) @@ -90,19 +92,19 @@ C_ASSERT_FIELD(KTHREAD, 0x250, PVOID, StackBase) C_ASSERT_FIELD(KTHREAD, 0x258, KAPC, SuspendApc) C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill0) C_ASSERT_FIELD(KTHREAD, 0x259, CHAR, Spare04) -C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill1) +C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[3], SuspendApcFill1) C_ASSERT_FIELD(KTHREAD, 0x25B, UCHAR, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill2) +C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[4], SuspendApcFill2) C_ASSERT_FIELD(KTHREAD, 0x25C, ULONG, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill3) -C_ASSERT_FIELD(KTHREAD, 0x298, KPRCB*, WaitPrcb) -C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill4) +C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[64], SuspendApcFill3) +C_ASSERT_FIELD(KTHREAD, 0x298, PKPRCB, WaitPrcb) +C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[72], SuspendApcFill4) C_ASSERT_FIELD(KTHREAD, 0x2A0, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill5) +C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[83], SuspendApcFill5) C_ASSERT_FIELD(KTHREAD, 0x2AB, UCHAR, PowerState) C_ASSERT_FIELD(KTHREAD, 0x2AC, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x2B0, KSEMAPHORE, SuspendSemaphore) -C_ASSERT_FIELD(KTHREAD, 0x2B0, UCHAR, SuspendSemaphorefill) +C_ASSERT_FIELD(KTHREAD, 0x2B0, UCHAR[28], SuspendSemaphorefill) C_ASSERT_FIELD(KTHREAD, 0x2CC, ULONG, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x2D0, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x2E0, LIST_ENTRY, MutantListHead) diff --git a/sdk/include/ndk/tests/winvista_x86.c b/sdk/include/ndk/tests/winvista_x86.c index 40700e8a46..c3521dde66 100644 --- a/sdk/include/ndk/tests/winvista_x86.c +++ b/sdk/include/ndk/tests/winvista_x86.c @@ -7,19 +7,21 @@ #include <ntifs.h> #include <ndk/ntndk.h> -#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); +#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \ + C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \ + C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType)); /* KTHREAD */ C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header) -C_ASSERT_FIELD(KTHREAD, 0x010, UINT64, CycleTime) +C_ASSERT_FIELD(KTHREAD, 0x010, ULONG64, CycleTime) C_ASSERT_FIELD(KTHREAD, 0x018, ULONG, HighCycleTime) -C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget) +C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget) C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack) C_ASSERT_FIELD(KTHREAD, 0x02C, PVOID, StackLimit) C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, KernelStack) C_ASSERT_FIELD(KTHREAD, 0x034, ULONG, ThreadLock) C_ASSERT_FIELD(KTHREAD, 0x038, KAPC_STATE, ApcState) -C_ASSERT_FIELD(KTHREAD, 0x038, UCHAR, ApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x038, UCHAR[23], ApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x04F, CHAR, Priority) C_ASSERT_FIELD(KTHREAD, 0x050, USHORT, NextProcessor) C_ASSERT_FIELD(KTHREAD, 0x052, USHORT, DeferredProcessor) @@ -29,35 +31,35 @@ C_ASSERT_FIELD(KTHREAD, 0x05C, UCHAR, State) C_ASSERT_FIELD(KTHREAD, 0x05D, UCHAR, NpxState) C_ASSERT_FIELD(KTHREAD, 0x05E, UCHAR, WaitIrql) C_ASSERT_FIELD(KTHREAD, 0x05F, CHAR, WaitMode) -C_ASSERT_FIELD(KTHREAD, 0x060, LONG32, WaitStatus) -C_ASSERT_FIELD(KTHREAD, 0x064, KWAIT_BLOCK*, WaitBlockList) -C_ASSERT_FIELD(KTHREAD, 0x064, KGATE*, GateObject) +C_ASSERT_FIELD(KTHREAD, 0x060, LONG, WaitStatus) +C_ASSERT_FIELD(KTHREAD, 0x064, PKWAIT_BLOCK, WaitBlockList) +C_ASSERT_FIELD(KTHREAD, 0x064, PKGATE, GateObject) C_ASSERT_FIELD(KTHREAD, 0x068, LONG, MiscFlags) C_ASSERT_FIELD(KTHREAD, 0x06C, UCHAR, WaitReason) C_ASSERT_FIELD(KTHREAD, 0x06D, UCHAR, SwapBusy) -C_ASSERT_FIELD(KTHREAD, 0x06E, UCHAR, Alerted) +C_ASSERT_FIELD(KTHREAD, 0x06E, UCHAR[2], Alerted) C_ASSERT_FIELD(KTHREAD, 0x070, LIST_ENTRY, WaitListEntry) C_ASSERT_FIELD(KTHREAD, 0x070, SINGLE_LIST_ENTRY, SwapListEntry) -C_ASSERT_FIELD(KTHREAD, 0x078, KQUEUE*, Queue) +C_ASSERT_FIELD(KTHREAD, 0x078, PKQUEUE, Queue) C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, WaitTime) -C_ASSERT_FIELD(KTHREAD, 0x080, INT16, KernelApcDisable) -C_ASSERT_FIELD(KTHREAD, 0x082, INT16, SpecialApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x080, SHORT, KernelApcDisable) +C_ASSERT_FIELD(KTHREAD, 0x082, SHORT, SpecialApcDisable) C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, CombinedApcDisable) C_ASSERT_FIELD(KTHREAD, 0x084, PVOID, Teb) C_ASSERT_FIELD(KTHREAD, 0x088, KTIMER, Timer) -C_ASSERT_FIELD(KTHREAD, 0x088, UCHAR, TimerFill) -C_ASSERT_FIELD(KTHREAD, 0x0B0, LONG32, ThreadFlags) -C_ASSERT_FIELD(KTHREAD, 0x0B8, KWAIT_BLOCK, WaitBlock) -C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill0) +C_ASSERT_FIELD(KTHREAD, 0x088, UCHAR[40], TimerFill) +C_ASSERT_FIELD(KTHREAD, 0x0B0, LONG, ThreadFlags) +C_ASSERT_FIELD(KTHREAD, 0x0B8, KWAIT_BLOCK[4], WaitBlock) +C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[23], WaitBlockFill0) C_ASSERT_FIELD(KTHREAD, 0x0CF, UCHAR, IdealProcessor) -C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill1) +C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[47], WaitBlockFill1) C_ASSERT_FIELD(KTHREAD, 0x0E7, CHAR, PreviousMode) -C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill2) +C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[71], WaitBlockFill2) C_ASSERT_FIELD(KTHREAD, 0x0FF, UCHAR, ResourceIndex) -C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill3) +C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[95], WaitBlockFill3) C_ASSERT_FIELD(KTHREAD, 0x117, UCHAR, LargeStack) C_ASSERT_FIELD(KTHREAD, 0x118, LIST_ENTRY, QueueListEntry) -C_ASSERT_FIELD(KTHREAD, 0x120, KTRAP_FRAME*, TrapFrame) +C_ASSERT_FIELD(KTHREAD, 0x120, PKTRAP_FRAME, TrapFrame) C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, FirstArgument) C_ASSERT_FIELD(KTHREAD, 0x128, PVOID, CallbackStack) C_ASSERT_FIELD(KTHREAD, 0x128, ULONG, CallbackDepth) @@ -73,11 +75,11 @@ C_ASSERT_FIELD(KTHREAD, 0x137, CHAR, Saturation) C_ASSERT_FIELD(KTHREAD, 0x138, ULONG, SystemCallNumber) C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, Spare02) C_ASSERT_FIELD(KTHREAD, 0x140, ULONG, UserAffinity) -C_ASSERT_FIELD(KTHREAD, 0x144, KPROCESS*, Process) +C_ASSERT_FIELD(KTHREAD, 0x144, PKPROCESS, Process) C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, Affinity) -C_ASSERT_FIELD(KTHREAD, 0x14C, KAPC_STATE*, ApcStatePointer) +C_ASSERT_FIELD(KTHREAD, 0x14C, PKAPC_STATE[2], ApcStatePointer) C_ASSERT_FIELD(KTHREAD, 0x154, KAPC_STATE, SavedApcState) -C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, SavedApcStateFill) +C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR[23], SavedApcStateFill) C_ASSERT_FIELD(KTHREAD, 0x16B, CHAR, FreezeCount) C_ASSERT_FIELD(KTHREAD, 0x16C, CHAR, SuspendCount) C_ASSERT_FIELD(KTHREAD, 0x16D, UCHAR, UserIdealProcessor) @@ -88,23 +90,21 @@ C_ASSERT_FIELD(KTHREAD, 0x174, PVOID, StackBase) C_ASSERT_FIELD(KTHREAD, 0x178, KAPC, SuspendApc) C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill0) C_ASSERT_FIELD(KTHREAD, 0x179, CHAR, Spare04) -C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill1) +C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[3], SuspendApcFill1) C_ASSERT_FIELD(KTHREAD, 0x17B, UCHAR, QuantumReset) -C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill2) +C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[4], SuspendApcFill2) C_ASSERT_FIELD(KTHREAD, 0x17C, ULONG, KernelTime) -C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill3) -C_ASSERT_FIELD(KTHREAD, 0x19C, KPRCB*, WaitPrcb) -C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill4) +C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[36], SuspendApcFill3) +C_ASSERT_FIELD(KTHREAD, 0x19C, PKPRCB, WaitPrcb) +C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[40], SuspendApcFill4) C_ASSERT_FIELD(KTHREAD, 0x1A0, PVOID, LegoData) -C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill5) +C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[47], SuspendApcFill5) C_ASSERT_FIELD(KTHREAD, 0x1A7, UCHAR, PowerState) C_ASSERT_FIELD(KTHREAD, 0x1A8, ULONG, UserTime) C_ASSERT_FIELD(KTHREAD, 0x1AC, KSEMAPHORE, SuspendSemaphore) -C_ASSERT_FIELD(KTHREAD, 0x1AC, UCHAR, SuspendSemaphorefill) +C_ASSERT_FIELD(KTHREAD, 0x1AC, UCHAR[20], SuspendSemaphorefill) C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, SListFaultCount) C_ASSERT_FIELD(KTHREAD, 0x1C4, LIST_ENTRY, ThreadListEntry) C_ASSERT_FIELD(KTHREAD, 0x1CC, LIST_ENTRY, MutantListHead) C_ASSERT_FIELD(KTHREAD, 0x1D4, PVOID, SListFaultAddress) C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, MdlForLockedTeb) - -
7 years, 2 months
1
0
0
0
[reactos] 02/03: [NDK] Add Win8+ version of KTHREAD
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b8bd38c86046f0d67bd8c…
commit b8bd38c86046f0d67bd8c45870e48c2196e6ccad Author: Timo Kreuzer <timo(a)reactos.org> AuthorDate: Wed Aug 16 08:33:44 2017 +0200 [NDK] Add Win8+ version of KTHREAD --- sdk/include/ndk/ketypes.h | 598 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 596 insertions(+), 2 deletions(-) diff --git a/sdk/include/ndk/ketypes.h b/sdk/include/ndk/ketypes.h index 07e9feb946..7963217d8b 100644 --- a/sdk/include/ndk/ketypes.h +++ b/sdk/include/ndk/ketypes.h @@ -919,9 +919,178 @@ typedef struct _KTHREAD_COUNTERS }KTHREAD_COUNTERS, *PKTHREAD_COUNTERS; #endif +/// FIXME: should move to rtltypes.h, but we can't include it here. +#if (NTDDI_VERSION >= NTDDI_WIN8) +typedef struct _RTL_RB_TREE +{ + PRTL_BALANCED_NODE Root; + PRTL_BALANCED_NODE Min; +} RTL_RB_TREE, *PRTL_RB_TREE; +#endif + +#if (NTDDI_VERSION >= NTDDI_WINBLUE) +typedef struct _KLOCK_ENTRY_LOCK_STATE +{ + union + { + struct + { +#if (NTDDI_VERSION >= NTDDI_WIN10) // since 6.4.9841.0 + ULONG_PTR CrossThreadReleasable : 1; +#else + ULONG_PTR Waiting : 1; +#endif + ULONG_PTR Busy : 1; + ULONG_PTR Reserved : (8 * sizeof(PVOID)) - 3; // previously Spare + ULONG_PTR InTree : 1; + }; + PVOID LockState; + }; + union + { + PVOID SessionState; + struct + { + ULONG SessionId; +#ifdef _WIN64 + ULONG SessionPad; +#endif + }; + }; +} KLOCK_ENTRY_LOCK_STATE, *PKLOCK_ENTRY_LOCK_STATE; + +typedef struct _KLOCK_ENTRY +{ + union + { + RTL_BALANCED_NODE TreeNode; + SINGLE_LIST_ENTRY FreeListEntry; + }; +#if (NTDDI_VERSION >= NTDDI_WIN10) + union + { + ULONG EntryFlags; + struct + { + UCHAR EntryOffset; + union + { + UCHAR ThreadLocalFlags; + struct + { + UCHAR WaitingBit : 1; + UCHAR Spare0 : 7; + }; + }; + union + { + UCHAR AcquiredByte; + UCHAR AcquiredBit : 1; + }; + union + { + UCHAR CrossThreadFlags; + struct + { + UCHAR HeadNodeBit : 1; + UCHAR IoPriorityBit : 1; + UCHAR IoQoSWaiter : 1; // since TH2 + UCHAR Spare1 : 5; + }; + }; + }; + struct + { + ULONG StaticState : 8; + ULONG AllFlags : 24; + }; + }; +#ifdef _WIN64 + ULONG SpareFlags; +#endif +#else + union + { + PVOID ThreadUnsafe; + struct + { + volatile UCHAR HeadNodeByte; + UCHAR Reserved1[2]; + volatile UCHAR AcquiredByte; + }; + }; +#endif + + union + { + KLOCK_ENTRY_LOCK_STATE LockState; + PVOID LockUnsafe; + struct + { +#if (NTDDI_VERSION >= NTDDI_WIN10) + volatile UCHAR CrossThreadReleasableAndBusyByte; +#else + volatile UCHAR WaitingAndBusyByte; +#endif + UCHAR Reserved[sizeof(PVOID) - 2]; + UCHAR InTreeByte; + union + { + PVOID SessionState; + struct + { + ULONG SessionId; +#ifdef _WIN64 + ULONG SessionPad; +#endif + }; + }; + }; + }; + union + { + struct + { + RTL_RB_TREE OwnerTree; + RTL_RB_TREE WaiterTree; + }; + CHAR CpuPriorityKey; + }; + ULONG_PTR EntryLock; + union + { +#if _WIN64 + ULONG AllBoosts : 17; +#else + USHORT AllBoosts; +#endif + struct + { + struct + { + USHORT CpuBoostsBitmap : 15; + USHORT IoBoost : 1; + }; + struct + { + USHORT IoQoSBoost : 1; + USHORT IoNormalPriorityWaiterCount : 8; + USHORT IoQoSWaiterCount : 7; + }; + }; + }; +#if _WIN64 + ULONG SparePad; +#endif +} KLOCK_ENTRY, *PKLOCK_ENTRY; + +#endif + // // Kernel Thread (KTHREAD) // +#if (NTDDI_VERSION < NTDDI_WIN8) + typedef struct _KTHREAD { DISPATCHER_HEADER Header; @@ -1131,7 +1300,7 @@ typedef struct _KTHREAD UCHAR LargeStack; }; #endif // ] -#ifdef _M_AMD64 // [ +#ifdef _WIN64 // [ struct { UCHAR WaitBlockFill4[FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; @@ -1181,7 +1350,7 @@ typedef struct _KTHREAD PKTRAP_FRAME TrapFrame; #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [ PVOID FirstArgument; - union // 2 elements, 0x8 bytes (sizeof) + union { PVOID CallbackStack; ULONG_PTR CallbackDepth; @@ -1369,6 +1538,431 @@ typedef struct _KTHREAD #endif // ] } KTHREAD; +#else // not (NTDDI_VERSION < NTDDI_WIN8) + +#if defined(_WIN64) && (NTDDI_VERSION < 0x06032580) // since WIN 8.1 Update1 6.3.9600.16384 +#define NUMBER_OF_LOCK_ENTRIES 5 +#else +#define NUMBER_OF_LOCK_ENTRIES 6 +#endif + +typedef struct _KTHREAD +{ + DISPATCHER_HEADER Header; + PVOID SListFaultAddress; + ULONG64 QuantumTarget; + PVOID InitialStack; + volatile VOID *StackLimit; + PVOID StackBase; + KSPIN_LOCK ThreadLock; + volatile ULONG64 CycleTime; +#ifndef _WIN64 + volatile ULONG HighCycleTime; + PVOID ServiceTable; +#endif + ULONG CurrentRunTime; + ULONG ExpectedRunTime; + PVOID KernelStack; + XSAVE_FORMAT* StateSaveArea; + struct _KSCHEDULING_GROUP* SchedulingGroup; + KWAIT_STATUS_REGISTER WaitRegister; + BOOLEAN Running; + BOOLEAN Alerted[MaximumMode]; + + union + { + struct + { +#if (NTDDI_VERSION < NTDDI_WIN10) + ULONG KernelStackResident : 1; +#else + ULONG AutoBoostActive : 1; +#endif + ULONG ReadyTransition : 1; +#if (NTDDI_VERSION < NTDDI_WIN10TH2) + ULONG ProcessReadyQueue : 1; +#endif + ULONG ProcessReadyQueue : 1; + ULONG WaitNext : 1; + ULONG SystemAffinityActive : 1; + ULONG Alertable : 1; +#if (NTDDI_VERSION < NTDDI_WIN81) + ULONG CodePatchInProgress : 1; +#endif + ULONG UserStackWalkActive : 1; + ULONG ApcInterruptRequest : 1; + ULONG QuantumEndMigrate : 1; + ULONG UmsDirectedSwitchEnable : 1; + ULONG TimerActive : 1; + ULONG SystemThread : 1; + ULONG ProcessDetachActive : 1; + ULONG CalloutActive : 1; + ULONG ScbReadyQueue : 1; + ULONG ApcQueueable : 1; + ULONG ReservedStackInUse : 1; + ULONG UmsPerformingSyscall : 1; + ULONG DisableStackCheck : 1; + ULONG Reserved : 12; + }; + LONG MiscFlags; + }; + + union + { + struct + { + ULONG AutoAlignment : 1; + ULONG DisableBoost : 1; + ULONG UserAffinitySet : 1; + ULONG AlertedByThreadId : 1; + ULONG QuantumDonation : 1; + ULONG EnableStackSwap : 1; + ULONG GuiThread : 1; + ULONG DisableQuantum : 1; + ULONG ChargeOnlyGroup : 1; + ULONG DeferPreemption : 1; + ULONG QueueDeferPreemption : 1; + ULONG ForceDeferSchedule : 1; + ULONG ExplicitIdealProcessor : 1; + ULONG FreezeCount : 1; +#if (NTDDI_VERSION >= 0x060324D7) // since 6.3.9431.0 + ULONG TerminationApcRequest : 1; +#endif +#if (NTDDI_VERSION >= 0x06032580) // since 6.3.9600.16384 + ULONG AutoBoostEntriesExhausted : 1; +#endif +#if (NTDDI_VERSION >= 0x06032580) // since 6.3.9600.17031 + ULONG KernelStackResident : 1; +#endif +#if (NTDDI_VERSION >= NTDDI_WIN10) + ULONG CommitFailTerminateRequest : 1; + ULONG ProcessStackCountDecremented : 1; + ULONG ThreadFlagsSpare : 5; +#endif + ULONG EtwStackTraceApcInserted : 8; +#if (NTDDI_VERSION < NTDDI_WIN10) + ULONG ReservedFlags : 10; +#endif + }; + LONG ThreadFlags; + }; + +#if (NTDDI_VERSION >= NTDDI_WIN10) + volatile UCHAR Tag; + UCHAR SystemHeteroCpuPolicy; + UCHAR UserHeteroCpuPolicy : 7; + UCHAR ExplicitSystemHeteroCpuPolicy : 1; + UCHAR Spare0; +#else + ULONG Spare0; +#endif + ULONG SystemCallNumber; +#ifdef _WIN64 + ULONG Spare1; // Win 10: Spare10 +#endif + PVOID FirstArgument; + PKTRAP_FRAME TrapFrame; + + union + { + KAPC_STATE ApcState; + struct + { + UCHAR ApcStateFill[RTL_SIZEOF_THROUGH_FIELD(KAPC_STATE, UserApcPending)]; // 32bit: 23/0x17, 64bit: 43/0x2B + SCHAR Priority; + ULONG UserIdealProcessor; + }; + }; + +#ifndef _WIN64 + ULONG ContextSwitches; + volatile UCHAR State; +#if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10074.0 + CHAR Spare12; +#else + CHAR NpxState; +#endif + KIRQL WaitIrql; + KPROCESSOR_MODE WaitMode; +#endif + + volatile INT_PTR WaitStatus; + PKWAIT_BLOCK WaitBlockList; + union + { + LIST_ENTRY WaitListEntry; + SINGLE_LIST_ENTRY SwapListEntry; + }; + PKQUEUE Queue; + PVOID Teb; +#if (NTDDI_VERSION >= NTDDI_WIN8 /* 0x060223F0 */) // since 6.2.9200.16384 + ULONG64 RelativeTimerBias; +#endif + KTIMER Timer; + + union + { + DECLSPEC_ALIGN(8) KWAIT_BLOCK WaitBlock[THREAD_WAIT_OBJECTS + 1]; +#ifdef _WIN64 + struct + { + UCHAR WaitBlockFill4[FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; // 32bit: -, 64bit: 20/0x14 + ULONG ContextSwitches; + }; + struct + { + UCHAR WaitBlockFill5[1 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; // 32bit: -, 64bit: 68/0x44 + UCHAR State; +#if (NTDDI_VERSION >= NTDDI_WIN10) + CHAR Spare13; +#else + CHAR NpxState; +#endif + UCHAR WaitIrql; + CHAR WaitMode; + }; + struct + { + UCHAR WaitBlockFill6[2 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; // 32bit: -, 64bit: 116/0x74 + ULONG WaitTime; + }; + struct + { + UCHAR WaitBlockFill7[3 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; // 32bit: -, 64bit: 164/0xA4 + union + { + struct + { + SHORT KernelApcDisable; + SHORT SpecialApcDisable; + }; + ULONG CombinedApcDisable; + }; + }; +#endif + struct + { + UCHAR WaitBlockFill8[FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]; // 32bit: 20/0x14, 64bit: 40/0x28 + struct _KTHREAD_COUNTERS *ThreadCounters; + }; + struct + { + UCHAR WaitBlockFill9[1 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]; // 32bit: 44/0x2C, 64bit: 88/0x58 + PXSTATE_SAVE XStateSave; + }; + struct + { + UCHAR WaitBlockFill10[2 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]; // 32bit: 68/0x44, 64bit: 136/0x88 + PVOID Win32Thread; + }; + struct + { + UCHAR WaitBlockFill11[3 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, Object)]; // 32bit: 88/0x58, 64bit: 176/0xB0 +#ifdef _WIN64 + struct _UMS_CONTROL_BLOCK* Ucb; + struct _KUMS_CONTEXT_HEADER* Uch; +#else + ULONG WaitTime; + union + { + struct + { + SHORT KernelApcDisable; + SHORT SpecialApcDisable; + }; + ULONG CombinedApcDisable; + }; +#endif + }; + }; + +#ifdef _WIN64 + PVOID TebMappedLowVa; +#endif + LIST_ENTRY QueueListEntry; +#if (NTDDI_VERSION >= 0x060223F0) // since 6.2.9200.16384 + union + { + ULONG NextProcessor; + struct + { + ULONG NextProcessorNumber : 31; + ULONG SharedReadyQueue : 1; + }; + }; + LONG QueuePriority; +#else + ULONG NextProcessor; + ULONG DeferredProcessor; +#endif + PKPROCESS Process; + + union + { + GROUP_AFFINITY UserAffinity; + struct + { + UCHAR UserAffinityFill[FIELD_OFFSET(GROUP_AFFINITY, Reserved)]; // 32bit: 6/0x6, 64bit: 10/0x0A + CHAR PreviousMode; + CHAR BasePriority; + union + { + CHAR PriorityDecrement; + struct + { + UCHAR ForegroundBoost : 4; + UCHAR UnusualBoost : 4; + }; + }; + UCHAR Preempted; + UCHAR AdjustReason; + CHAR AdjustIncrement; + }; + }; + +#if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10240.16384 + ULONG_PTR AffinityVersion; +#endif + union + { + GROUP_AFFINITY Affinity; + struct + { + UCHAR AffinityFill[FIELD_OFFSET(GROUP_AFFINITY, Reserved)]; // 32bit: 6/0x6, 64bit: 10/0x0A + UCHAR ApcStateIndex; + UCHAR WaitBlockCount; + ULONG IdealProcessor; + }; + }; + +#if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10240.16384 +#ifdef _WIN64 + ULONG64 NpxState; +#else + ULONG Spare15; +#endif +#else + PKAPC_STATE ApcStatePointer[2]; +#endif + + union + { + KAPC_STATE SavedApcState; + struct + { + UCHAR SavedApcStateFill[FIELD_OFFSET(KAPC_STATE, UserApcPending) + 1]; // 32bit: 23/0x17, 64bit: 43/0x2B + UCHAR WaitReason; + CHAR SuspendCount; + CHAR Saturation; + SHORT SListFaultCount; + }; + }; + + union + { + KAPC SchedulerApc; + struct + { + UCHAR SchedulerApcFill0[FIELD_OFFSET(KAPC, SpareByte0)]; // 32bit: 1/0x01, 64bit: 1/0x01 + UCHAR ResourceIndex; + }; + struct + { + UCHAR SchedulerApcFill1[FIELD_OFFSET(KAPC, SpareByte1)]; // 32bit: 3/0x03, 64bit: 3/0x03 + UCHAR QuantumReset; + }; + struct + { + UCHAR SchedulerApcFill2[FIELD_OFFSET(KAPC, SpareLong0)]; // 32bit: 4/0x04, 64bit: 4/0x04 + ULONG KernelTime; + }; + struct + { + UCHAR SuspendApcFill3[FIELD_OFFSET(KAPC, SystemArgument1)]; // 32 bit:, 64 bit: 64/0x40 + PKPRCB WaitPrcb; + }; + struct + { + UCHAR SchedulerApcFill4[FIELD_OFFSET(KAPC, SystemArgument2)]; // 32 bit:, 64 bit: 72/0x48 + PVOID LegoData; + }; + struct + { + UCHAR SchedulerApcFill5[FIELD_OFFSET(KAPC, Inserted) + 1]; // 32 bit:, 64 bit: 83/0x53 + UCHAR CallbackNestingLevel; + ULONG UserTime; + }; + }; + + KEVENT SuspendEvent; + LIST_ENTRY ThreadListEntry; + LIST_ENTRY MutantListHead; + +#if (NTDDI_VERSION >= NTDDI_WIN10) + UCHAR AbEntrySummary; + UCHAR AbWaitEntryCount; + USHORT Spare20; +#if _WIN64 + ULONG SecureThreadCookie; +#endif +#elif (NTDDI_VERSION >= NTDDI_WINBLUE) // 6.3.9431.0 + SINGLE_LIST_ENTRY LockEntriesFreeList; +#endif + +#if (NTDDI_VERSION >= NTDDI_WINBLUE /* 0x06032580 */) // since 6.3.9600.16384 + KLOCK_ENTRY LockEntries[NUMBER_OF_LOCK_ENTRIES]; + SINGLE_LIST_ENTRY PropagateBoostsEntry; + SINGLE_LIST_ENTRY IoSelfBoostsEntry; + UCHAR PriorityFloorCounts[16]; + ULONG PriorityFloorSummary; + volatile LONG AbCompletedIoBoostCount; + #if (NTDDI_VERSION >= NTDDI_WIN10_RS1) + LONG AbCompletedIoQoSBoostCount; + #endif + + #if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10240.16384 + volatile SHORT KeReferenceCount; + #else + volatile SHORT AbReferenceCount; + #endif + #if (NTDDI_VERSION >= 0x06040000) // since 6.4.9841.0 + UCHAR AbOrphanedEntrySummary; + UCHAR AbOwnedEntryCount; + #else + UCHAR AbFreeEntryCount; + UCHAR AbWaitEntryCount; + #endif + ULONG ForegroundLossTime; + union + { + LIST_ENTRY GlobalForegroundListEntry; + struct + { + SINGLE_LIST_ENTRY ForegroundDpcStackListEntry; + ULONG_PTR InGlobalForegroundList; + }; + }; +#endif + +#if _WIN64 + LONG64 ReadOperationCount; + LONG64 WriteOperationCount; + LONG64 OtherOperationCount; + LONG64 ReadTransferCount; + LONG64 WriteTransferCount; + LONG64 OtherTransferCount; +#endif +#if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10041.0 + struct _KSCB *QueuedScb; +#ifndef _WIN64 + ULONG64 NpxState; +#endif +#endif +} KTHREAD; + +#endif + + #define ASSERT_THREAD(object) \ ASSERT((((object)->Header.Type & KOBJECT_TYPE_MASK) == ThreadObject))
7 years, 2 months
1
0
0
0
[reactos] 01/03: [XDK] Fix KWAIT_BLOCK definition for Win8+
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d176ddedd6fb165cb8a95…
commit d176ddedd6fb165cb8a954d0069df0274aec2871 Author: Timo Kreuzer <timo(a)reactos.org> AuthorDate: Wed Aug 16 08:34:47 2017 +0200 [XDK] Fix KWAIT_BLOCK definition for Win8+ --- sdk/include/xdk/ketypes.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sdk/include/xdk/ketypes.h b/sdk/include/xdk/ketypes.h index 710fd70e0e..5e276c08c7 100644 --- a/sdk/include/xdk/ketypes.h +++ b/sdk/include/xdk/ketypes.h @@ -442,6 +442,20 @@ typedef enum _KWAIT_REASON { typedef struct _KWAIT_BLOCK { LIST_ENTRY WaitListEntry; +#if (NTDDI_VERSION >= NTDDI_WIN8) + UCHAR WaitType; + volatile UCHAR BlockState; + USHORT WaitKey; +#ifdef _WIN64 + LONG SpareLong; +#endif + union { + struct _KTHREAD *Thread; + struct _KQUEUE *NotificationQueue; + }; + PVOID Object; + PVOID SparePtr; +#else struct _KTHREAD *Thread; PVOID Object; struct _KWAIT_BLOCK *NextWaitBlock; @@ -455,6 +469,7 @@ typedef struct _KWAIT_BLOCK { #if defined(_WIN64) LONG SpareLong; #endif +#endif } KWAIT_BLOCK, *PKWAIT_BLOCK, *PRKWAIT_BLOCK; typedef enum _KINTERRUPT_MODE {
7 years, 2 months
1
0
0
0
[reactos] 01/01: [TRAVIS-CI] Fix formatting and move "./RosBEBinFull/RosBE.sh < tmp_file" to script for better 'Job Log' readability.
by Adam Stachowicz
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8b8108ddeefd84d527a43…
commit 8b8108ddeefd84d527a43f3eabab4a0134638636 Author: Adam Stachowicz <saibamenppl(a)gmail.com> AuthorDate: Sun Oct 8 15:54:43 2017 +0200 [TRAVIS-CI] Fix formatting and move "./RosBEBinFull/RosBE.sh < tmp_file" to script for better 'Job Log' readability. --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 643416724e..bf63e00393 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,9 @@ git: depth: 1 before_script: -- wget
https://svn.reactos.org/amine/RosBEBinFull.tar.gz
-O RosBE.tar.gz -- tar -xzf RosBE.tar.gz -- echo 'mkdir ../Build && cd ../Build && $TRAVIS_BUILD_DIR/configure.sh -DENABLE_ROSTESTS=1 && cd reactos && ninja && ninja bootcd' > tmp_file -- ./RosBEBinFull/RosBE.sh < tmp_file \ No newline at end of file + - wget
https://svn.reactos.org/amine/RosBEBinFull.tar.gz
-O RosBE.tar.gz + - tar -xzf RosBE.tar.gz + - echo 'mkdir ../Build && cd ../Build && $TRAVIS_BUILD_DIR/configure.sh -DENABLE_ROSTESTS=1 && cd reactos && ninja && ninja bootcd' > tmp_file + +script: + - ./RosBEBinFull/RosBE.sh < tmp_file
7 years, 2 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
28
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
Results per page:
10
25
50
100
200