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
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
September 2005
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
582 discussions
Start a n
N
ew thread
[navaraf] 17851: Patricio Martínez Ros <silencium@wanadoo.es>
by navaraf@svn.reactos.com
Patricio Martínez Ros <silencium(a)wanadoo.es> Spanish translation. Modified: trunk/reactos/lib/cpl/desk/desk.rc Added: trunk/reactos/lib/cpl/desk/es.rc _____ Modified: trunk/reactos/lib/cpl/desk/desk.rc --- trunk/reactos/lib/cpl/desk/desk.rc 2005-09-14 20:24:43 UTC (rev 17850) +++ trunk/reactos/lib/cpl/desk/desk.rc 2005-09-14 21:06:35 UTC (rev 17851) @@ -18,3 +18,4 @@ #include "nl.rc" #include "pl.rc" #include "sv.rc" +#include "es.rc" _____ Added: trunk/reactos/lib/cpl/desk/es.rc --- trunk/reactos/lib/cpl/desk/es.rc 2005-09-14 20:24:43 UTC (rev 17850) +++ trunk/reactos/lib/cpl/desk/es.rc 2005-09-14 21:06:35 UTC (rev 17851) @@ -0,0 +1,111 @@ +/* + * desk (Spanish resources) + * + * Copyright 2005 Patricio MartÝnez Ros + * + */ + +LANGUAGE LANG_SPANISH, SUBLANG_SPANISH + +IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Escritorio" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "",IDC_BACKGROUND_PREVIEW,"Static",SS_OWNERDRAW,48,10, + 150,105,WS_EX_STATICEDGE + CONTROL "",IDC_BACKGROUND_LIST,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | + WS_BORDER | WS_TABSTOP,7,139,173,71 + LTEXT "Fondo:", + IDC_STATIC,8,127,180,8 + PUSHBUTTON "&Examinar...",IDC_BROWSE_BUTTON,187,175,50,14 + PUSHBUTTON "&Color...",IDC_COLOR_BUTTON,187,195,50,14 + LTEXT "Posici¾n",IDC_STATIC,187,138,36,8 + COMBOBOX IDC_PLACEMENT_COMBO,187,148,50,90,CBS_DROPDOWNLIST | + CBS_SORT | WS_VSCROLL | WS_TABSTOP +END + +IDD_SCREENSAVER DIALOGEX DISCARDABLE 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Protector de pantalla" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "&Protector de pantalla",IDC_SCREENS_DUMMY, 5, 7, 238, 176 + + LTEXT "Lista de protectores de pantalla:",IDC_STATIC,13, 24, 108, 9 + CONTROL "",IDC_SCREENS_CHOICES,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | + WS_BORDER | WS_TABSTOP,13, 34, 171, 109 + PUSHBUTTON "Eliminar",IDC_SCREENS_DELETE, 189,47,39,10 + PUSHBUTTON "&A±adir",IDC_SCREENS_POWER_BUTTON, 190,34,39,10 + + PUSHBUTTON "Configuraci¾n...",IDC_SCREENS_SETTINGS,133, 164, 56, 12,WS_GROUP + PUSHBUTTON "&Vista previa",IDC_SCREENS_TESTSC,192, 164, 43, 12 + + CONTROL "Protecci¾n con &password.",IDC_SCREENS_USEPASSCHK,"button", + BS_AUTOCHECKBOX | WS_TABSTOP,13, 161, 119, 18 + + LTEXT "&Esperar:",IDC_STATIC,13, 150, 31, 9 + EDITTEXT IDC_SCREENS_TIMEDELAY,44, 148, 31, 12,ES_RIGHT | WS_GROUP + CONTROL "",IDC_SCREENS_TIME ,"UPDOWN_CLASS",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + WS_BORDER | WS_GROUP,62, 148, 12, 12 + LTEXT "Minutos antes de mostrar el protector de pantalla.",IDC_STATIC,79, 150, 161, 9 + + GROUPBOX "Ahorro de energÝa del monitor",IDC_SCREENS_DUMMY,5, 186, 238, 35 + LTEXT "Para ajustar la configuraci¾n de energÝa del monitor, haga click en EnergÝa.", + IDC_STATIC,16, 199, 155, 19 + PUSHBUTTON "EnergÝa...",IDC_SCREENS_POWER_BUTTON,180, 202, 57, 12 +END + +IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Apariencia" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Este espacio se ha dejado en blanco intencionadamente",IDC_STATIC,33, + 109,181,10 +END + +IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Configuraci¾n" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Monitor",1820,3,140,30,8 + LTEXT "<ninguno>",IDC_SETTINGS_DEVICE,9,149,224,8 + GROUPBOX "Resoluci¾n de &pantalla",1818,3,160,115,43 + CONTROL "",IDC_SETTINGS_RESOLUTION,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, + 30,170,58,17 + LTEXT "Menos",1815,8,170,21,8,NOT WS_GROUP + LTEXT "Mßs",1816,93,170,21,8,NOT WS_GROUP + LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,190,100,10,NOT WS_GROUP | SS_CENTER + GROUPBOX "&Calidad de color",1817,125,160,115,43 + COMBOBOX IDC_SETTINGS_BPP,131,170,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP + CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_SUNKEN, + 131,188,103,9 + PUSHBUTTON "A&vanzado...",IDC_SETTINGS_ADVANCED,306,205,56,14 +END + +STRINGTABLE +BEGIN + IDS_CPLNAME "Pantalla" + IDS_CPLDESCRIPTION "Personaliza el fondo de escritorio y el protector de pantalla." + + IDS_NONE "(Ninguno)" + IDS_CENTER "Centrada" + IDS_STRETCH "Expandida" + IDS_TILE "En mosaico" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_COLOR_4BIT "Muy baja (4 bits)" + IDS_COLOR_8BIT "Baja (8 bits)" + IDS_COLOR_16BIT "Media (16 bits)" + IDS_COLOR_24BIT "Alta (24 bits)" + IDS_COLOR_32BIT "La mßs alta (32 bits)" + IDS_PIXEL "%lu por %lu pÝxeles" +END
19 years, 1 month
1
0
0
0
[amunger] 17850: Fix regexpl so it properly prints a DWORD_LITTLE_ENDIAN.
by amunger@svn.reactos.com
Fix regexpl so it properly prints a DWORD_LITTLE_ENDIAN. Modified: trunk/rosapps/sysutils/regexpl/ShellCommandValue.cpp _____ Modified: trunk/rosapps/sysutils/regexpl/ShellCommandValue.cpp --- trunk/rosapps/sysutils/regexpl/ShellCommandValue.cpp 2005-09-14 19:32:47 UTC (rev 17849) +++ trunk/rosapps/sysutils/regexpl/ShellCommandValue.cpp 2005-09-14 20:24:43 UTC (rev 17850) @@ -194,11 +194,15 @@ { case REG_DWORD_LITTLE_ENDIAN: { - TCHAR Buffer[11]; - unsigned int n = *pDataBuffer; - _stprintf(Buffer,_T("0x%08X\n"),n); - rConsole.Write(Buffer); + TCHAR Buffer[3]; + rConsole.Write(_T("0x")); + for (unsigned int i = 0 ; i < dwValueSize ; i++) + { + _stprintf(Buffer,_T("%02X"),*(pDataBuffer+((dwValueSize-1)-i))); + rConsole.Write(Buffer); + } } + rConsole.Write(_T("\n")); break; case REG_DWORD_BIG_ENDIAN: {
19 years, 1 month
1
0
0
0
[hpoussin] 17849: Fix indentation of generated code, by letting Output method do its indenting job
by hpoussin@svn.reactos.com
Fix indentation of generated code, by letting Output method do its indenting job Modified: trunk/reactos/tools/gendib/gendib.c _____ Modified: trunk/reactos/tools/gendib/gendib.c --- trunk/reactos/tools/gendib/gendib.c 2005-09-14 02:03:17 UTC (rev 17848) +++ trunk/reactos/tools/gendib/gendib.c 2005-09-14 19:32:47 UTC (rev 17849) @@ -940,18 +940,17 @@ MARK(Out); Output(Out, "\n"); Output(Out, "static void (*PrimitivesTable[256])(PBLTINFO) =\n"); - Output(Out, " {\n"); + Output(Out, "{\n"); for (RopCode = 0; RopCode < 256; RopCode++) { - Output(Out, " "); PrintRoutineName(Out, Bpp, FindRopInfo(RopCode)); if (RopCode < 255) { - putc(',', Out); + Output(Out, ","); } - putc('\n', Out); + Output(Out, "\n"); } - Output(Out, " };\n"); + Output(Out, "};\n"); } static void @@ -962,9 +961,9 @@ Output(Out, "BOOLEAN\n"); Output(Out, "DIB_%uBPP_BitBlt(PBLTINFO BltInfo)\n", Bpp); Output(Out, "{\n"); - Output(Out, " PrimitivesTable[BltInfo->Rop4 & 0xff](BltInfo);\n"); + Output(Out, "PrimitivesTable[BltInfo->Rop4 & 0xff](BltInfo);\n"); Output(Out, "\n"); - Output(Out, " return TRUE;\n"); + Output(Out, "return TRUE;\n"); Output(Out, "}\n"); }
19 years, 1 month
1
0
0
0
[ion] 17848: fix build
by ion@svn.reactos.com
fix build Modified: trunk/reactos/drivers/video/videoprt/int10.c _____ Modified: trunk/reactos/drivers/video/videoprt/int10.c --- trunk/reactos/drivers/video/videoprt/int10.c 2005-09-14 01:44:19 UTC (rev 17847) +++ trunk/reactos/drivers/video/videoprt/int10.c 2005-09-14 02:03:17 UTC (rev 17848) @@ -22,7 +22,7 @@ */ #include "videoprt.h" -#include "internal/v86m.h" +#include "internal/ke.h" /* PRIVATE FUNCTIONS **********************************************************/
19 years, 1 month
1
0
0
0
[ion] 17847: ntoskrnl header cleanups
by ion@svn.reactos.com
ntoskrnl header cleanups Modified: trunk/reactos/include/ndk/i386/ketypes.h Modified: trunk/reactos/ntoskrnl/cc/cacheman.c Modified: trunk/reactos/ntoskrnl/cc/copy.c Modified: trunk/reactos/ntoskrnl/cc/view.c Modified: trunk/reactos/ntoskrnl/include/internal/cc.h Deleted: trunk/reactos/ntoskrnl/include/internal/fs.h Added: trunk/reactos/ntoskrnl/include/internal/fsrtl.h Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h Modified: trunk/reactos/ntoskrnl/include/internal/io.h Modified: trunk/reactos/ntoskrnl/include/internal/ke.h Modified: trunk/reactos/ntoskrnl/include/internal/ldr.h Added: trunk/reactos/ntoskrnl/include/internal/lpc.h Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Deleted: trunk/reactos/ntoskrnl/include/internal/port.h Deleted: trunk/reactos/ntoskrnl/include/internal/v86m.h Deleted: trunk/reactos/ntoskrnl/include/internal/xhal.h Modified: trunk/reactos/ntoskrnl/ke/bug.c Modified: trunk/reactos/ntoskrnl/ke/clock.c Modified: trunk/reactos/ntoskrnl/ke/dpc.c Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c Modified: trunk/reactos/ntoskrnl/ke/i386/irq.c Modified: trunk/reactos/ntoskrnl/ke/i386/kernel.c Modified: trunk/reactos/ntoskrnl/ke/i386/usertrap.c Modified: trunk/reactos/ntoskrnl/ke/i386/v86m.c Modified: trunk/reactos/ntoskrnl/ke/ipi.c Modified: trunk/reactos/ntoskrnl/ke/kthread.c Modified: trunk/reactos/ntoskrnl/ldr/loader.c _____ Modified: trunk/reactos/include/ndk/i386/ketypes.h --- trunk/reactos/include/ndk/i386/ketypes.h 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/include/ndk/i386/ketypes.h 2005-09-14 01:44:19 UTC (rev 17847) @@ -20,6 +20,12 @@ #define I386_INTERRUPT_GATE 0xE #define I386_TRAP_GATE 0xF +#define IPI_APC 1 +#define IPI_DPC 2 +#define IPI_FREEZE 3 +#define IPI_PACKET_READY 4 +#define IPI_SYNCH_REQUEST 10 + /* EXPORTED DATA *************************************************************/ /* ENUMERATIONS **************************************************************/ _____ Modified: trunk/reactos/ntoskrnl/cc/cacheman.c --- trunk/reactos/ntoskrnl/cc/cacheman.c 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/ntoskrnl/cc/cacheman.c 2005-09-14 01:44:19 UTC (rev 17847) @@ -16,6 +16,7 @@ /* FUNCTIONS *****************************************************************/ VOID +NTAPI CcInit(VOID) { CcInitView(); _____ Modified: trunk/reactos/ntoskrnl/cc/copy.c --- trunk/reactos/ntoskrnl/cc/copy.c 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/ntoskrnl/cc/copy.c 2005-09-14 01:44:19 UTC (rev 17847) @@ -39,6 +39,7 @@ /* FUNCTIONS *****************************************************************/ VOID +NTAPI CcInitCacheZeroPage(VOID) { NTSTATUS Status; @@ -58,6 +59,7 @@ } NTSTATUS +NTAPI ReadCacheSegmentChain(PBCB Bcb, ULONG ReadOffset, ULONG Length, PVOID Buffer) { @@ -187,6 +189,7 @@ } NTSTATUS +NTAPI ReadCacheSegment(PCACHE_SEGMENT CacheSeg) { ULONG Size; @@ -228,6 +231,7 @@ } NTSTATUS +NTAPI WriteCacheSegment(PCACHE_SEGMENT CacheSeg) { ULONG Size; _____ Modified: trunk/reactos/ntoskrnl/cc/view.c --- trunk/reactos/ntoskrnl/cc/view.c 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/ntoskrnl/cc/view.c 2005-09-14 01:44:19 UTC (rev 17847) @@ -159,6 +159,7 @@ } NTSTATUS +NTAPI CcRosFlushCacheSegment(PCACHE_SEGMENT CacheSegment) { NTSTATUS Status; @@ -179,6 +180,7 @@ } NTSTATUS +NTAPI CcRosFlushDirtyPages(ULONG Target, PULONG Count) { PLIST_ENTRY current_entry; @@ -355,6 +357,7 @@ } NTSTATUS +NTAPI CcRosReleaseCacheSegment(PBCB Bcb, PCACHE_SEGMENT CacheSeg, BOOLEAN Valid, @@ -403,6 +406,7 @@ } PCACHE_SEGMENT +NTAPI CcRosLookupCacheSegment(PBCB Bcb, ULONG FileOffset) { PLIST_ENTRY current_entry; @@ -434,6 +438,7 @@ } NTSTATUS +NTAPI CcRosMarkDirtyCacheSegment(PBCB Bcb, ULONG FileOffset) { PCACHE_SEGMENT CacheSeg; @@ -470,6 +475,7 @@ } NTSTATUS +NTAPI CcRosUnmapCacheSegment(PBCB Bcb, ULONG FileOffset, BOOLEAN NowDirty) { PCACHE_SEGMENT CacheSeg; @@ -689,6 +695,7 @@ } NTSTATUS +NTAPI CcRosGetCacheSegmentChain(PBCB Bcb, ULONG FileOffset, ULONG Length, @@ -752,6 +759,7 @@ } NTSTATUS +NTAPI CcRosGetCacheSegment(PBCB Bcb, ULONG FileOffset, PULONG BaseOffset, @@ -889,6 +897,7 @@ } NTSTATUS +NTAPI CcRosFreeCacheSegment(PBCB Bcb, PCACHE_SEGMENT CacheSeg) { NTSTATUS Status; @@ -995,6 +1004,7 @@ } NTSTATUS +NTAPI CcRosDeleteFileCache(PFILE_OBJECT FileObject, PBCB Bcb) /* * FUNCTION: Releases the BCB associated with a file object @@ -1065,7 +1075,9 @@ return(STATUS_SUCCESS); } -VOID CcRosReferenceCache(PFILE_OBJECT FileObject) +VOID +NTAPI +CcRosReferenceCache(PFILE_OBJECT FileObject) { PBCB Bcb; ExAcquireFastMutex(&ViewLock); @@ -1086,7 +1098,9 @@ ExReleaseFastMutex(&ViewLock); } -VOID CcRosSetRemoveOnClose(PSECTION_OBJECT_POINTERS SectionObjectPointer) +VOID +NTAPI +CcRosSetRemoveOnClose(PSECTION_OBJECT_POINTERS SectionObjectPointer) { PBCB Bcb; DPRINT("CcRosSetRemoveOnClose()\n"); @@ -1104,7 +1118,9 @@ } -VOID CcRosDereferenceCache(PFILE_OBJECT FileObject) +VOID +NTAPI +CcRosDereferenceCache(PFILE_OBJECT FileObject) { PBCB Bcb; ExAcquireFastMutex(&ViewLock); @@ -1171,6 +1187,7 @@ } NTSTATUS +NTAPI CcTryToInitializeFileCache(PFILE_OBJECT FileObject) { PBCB Bcb; @@ -1328,7 +1345,9 @@ } } -VOID INIT_FUNCTION +VOID +INIT_FUNCTION +NTAPI CcInitView(VOID) { #ifdef CACHE_BITMAP _____ Modified: trunk/reactos/ntoskrnl/include/internal/cc.h --- trunk/reactos/ntoskrnl/include/internal/cc.h 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/ntoskrnl/include/internal/cc.h 2005-09-14 01:44:19 UTC (rev 17847) @@ -77,36 +77,45 @@ ); NTSTATUS +NTAPI CcRosFlushCacheSegment(PCACHE_SEGMENT CacheSegment); NTSTATUS +NTAPI CcRosGetCacheSegment( PBCB Bcb, ULONG FileOffset, PULONG BaseOffset, - PVOID* BaseAddress, + PVOID *BaseAddress, PBOOLEAN UptoDate, - PCACHE_SEGMENT* CacheSeg + PCACHE_SEGMENT *CacheSeg ); VOID +NTAPI CcInitView(VOID); NTSTATUS +NTAPI CcRosFreeCacheSegment( PBCB, PCACHE_SEGMENT ); NTSTATUS +NTAPI ReadCacheSegment(PCACHE_SEGMENT CacheSeg); NTSTATUS +NTAPI WriteCacheSegment(PCACHE_SEGMENT CacheSeg); -VOID CcInit(VOID); +VOID +NTAPI +CcInit(VOID); NTSTATUS +NTAPI CcRosUnmapCacheSegment( PBCB Bcb, ULONG FileOffset, @@ -114,12 +123,14 @@ ); PCACHE_SEGMENT +NTAPI CcRosLookupCacheSegment( PBCB Bcb, ULONG FileOffset ); NTSTATUS +NTAPI CcRosGetCacheSegmentChain( PBCB Bcb, ULONG FileOffset, @@ -128,49 +139,57 @@ ); VOID +NTAPI CcInitCacheZeroPage(VOID); NTSTATUS +NTAPI CcRosMarkDirtyCacheSegment( PBCB Bcb, ULONG FileOffset ); NTSTATUS +NTAPI CcRosFlushDirtyPages( ULONG Target, PULONG Count ); VOID +NTAPI CcRosDereferenceCache(PFILE_OBJECT FileObject); VOID +NTAPI CcRosReferenceCache(PFILE_OBJECT FileObject); VOID +NTAPI CcRosSetRemoveOnClose(PSECTION_OBJECT_POINTERS SectionObjectPointer); NTSTATUS +NTAPI CcRosReleaseCacheSegment( - BCB* Bcb, - CACHE_SEGMENT* CacheSeg, - BOOLEAN Valid, - BOOLEAN Dirty, - BOOLEAN Mapped + BCB* Bcb, + CACHE_SEGMENT *CacheSeg, + BOOLEAN Valid, + BOOLEAN Dirty, + BOOLEAN Mapped ); NTSTATUS STDCALL CcRosRequestCacheSegment( - BCB* Bcb, - ULONG FileOffset, - PVOID* BaseAddress, - PBOOLEAN UptoDate, - CACHE_SEGMENT** CacheSeg + BCB *Bcb, + ULONG FileOffset, + PVOID* BaseAddress, + PBOOLEAN UptoDate, + CACHE_SEGMENT **CacheSeg ); NTSTATUS +NTAPI CcTryToInitializeFileCache(PFILE_OBJECT FileObject); /* _____ Deleted: trunk/reactos/ntoskrnl/include/internal/fs.h --- trunk/reactos/ntoskrnl/include/internal/fs.h 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/ntoskrnl/include/internal/fs.h 2005-09-14 01:44:19 UTC (rev 17847) @@ -1,89 +0,0 @@ -#ifndef __INCLUDE_INTERNAL_IFS_H -#define __INCLUDE_INTERNAL_IFS_H - -typedef struct _FILE_LOCK_GRANTED { - LIST_ENTRY ListEntry; - FILE_LOCK_INFO Lock; - PVOID UnlockContext; -} FILE_LOCK_GRANTED, *PFILE_LOCK_GRANTED; - - -typedef struct _FILE_LOCK_TOC { - KSPIN_LOCK SpinLock; - LIST_ENTRY GrantedListHead; - LIST_ENTRY PendingListHead; -} FILE_LOCK_TOC, *PFILE_LOCK_TOC; - -VOID -STDCALL INIT_FUNCTION -FsRtlpInitNotifyImplementation(VOID); - - -VOID STDCALL -FsRtlpInitFileLockingImplementation(VOID); - -VOID STDCALL -FsRtlpFileLockCancelRoutine( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp - ); - -BOOLEAN FASTCALL -FsRtlpCheckLockForReadOrWriteAccess( - IN PFILE_LOCK FileLock, - IN PLARGE_INTEGER FileOffset, - IN PLARGE_INTEGER Length, - IN ULONG Key, - IN PFILE_OBJECT FileObject, - IN PEPROCESS Process, - IN BOOLEAN Read - ); - -NTSTATUS FASTCALL -FsRtlpFastUnlockAllByKey( - IN PFILE_LOCK FileLock, - IN PFILE_OBJECT FileObject, - IN PEPROCESS Process, - IN DWORD Key, /* FIXME: guess */ - IN BOOLEAN UseKey, /* FIXME: guess */ - IN PVOID Context OPTIONAL - ); - -BOOLEAN FASTCALL -FsRtlpAddLock( - IN PFILE_LOCK_TOC LockToc, - IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN PLARGE_INTEGER Length, - IN PEPROCESS Process, - IN ULONG Key, - IN BOOLEAN ExclusiveLock, - IN PVOID UnlockContext - ); - -VOID FASTCALL -FsRtlpCompletePendingLocks( - IN PFILE_LOCK FileLock, - IN PFILE_LOCK_TOC LockToc, - IN OUT PKIRQL oldirql, - IN PVOID Context - ); - -NTSTATUS FASTCALL -FsRtlpUnlockSingle( - IN PFILE_LOCK FileLock, - IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN PLARGE_INTEGER Length, - IN PEPROCESS Process, - IN ULONG Key, - IN PVOID Context OPTIONAL, - IN BOOLEAN CallUnlockRoutine - ); - -VOID FASTCALL -FsRtlpDumpFileLocks( - IN PFILE_LOCK FileLock - ); - -#endif _____ Copied: trunk/reactos/ntoskrnl/include/internal/fsrtl.h (from rev 17811, trunk/reactos/ntoskrnl/include/internal/fs.h) --- trunk/reactos/ntoskrnl/include/internal/fs.h 2005-09-11 22:32:20 UTC (rev 17811) +++ trunk/reactos/ntoskrnl/include/internal/fsrtl.h 2005-09-14 01:44:19 UTC (rev 17847) @@ -0,0 +1,96 @@ +#ifndef __INCLUDE_INTERNAL_IFS_H +#define __INCLUDE_INTERNAL_IFS_H + +typedef struct _FILE_LOCK_GRANTED +{ + LIST_ENTRY ListEntry; + FILE_LOCK_INFO Lock; + PVOID UnlockContext; +} FILE_LOCK_GRANTED, *PFILE_LOCK_GRANTED; + +typedef struct _FILE_LOCK_TOC +{ + KSPIN_LOCK SpinLock; + LIST_ENTRY GrantedListHead; + LIST_ENTRY PendingListHead; +} FILE_LOCK_TOC, *PFILE_LOCK_TOC; + +VOID +INIT_FUNCTION +STDCALL +FsRtlpInitNotifyImplementation(VOID); + +VOID +STDCALL +FsRtlpInitFileLockingImplementation(VOID); + +VOID +STDCALL +FsRtlpFileLockCancelRoutine( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +BOOLEAN +FASTCALL +FsRtlpCheckLockForReadOrWriteAccess( + IN PFILE_LOCK FileLock, + IN PLARGE_INTEGER FileOffset, + IN PLARGE_INTEGER Length, + IN ULONG Key, + IN PFILE_OBJECT FileObject, + IN PEPROCESS Process, + IN BOOLEAN Read +); + +NTSTATUS +FASTCALL +FsRtlpFastUnlockAllByKey( + IN PFILE_LOCK FileLock, + IN PFILE_OBJECT FileObject, + IN PEPROCESS Process, + IN DWORD Key, + IN BOOLEAN UseKey, + IN PVOID Context OPTIONAL +); + +BOOLEAN +FASTCALL +FsRtlpAddLock( + IN PFILE_LOCK_TOC LockToc, + IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN PLARGE_INTEGER Length, + IN PEPROCESS Process, + IN ULONG Key, + IN BOOLEAN ExclusiveLock, + IN PVOID UnlockContext +); + +VOID +FASTCALL +FsRtlpCompletePendingLocks( + IN PFILE_LOCK FileLock, + IN PFILE_LOCK_TOC LockToc, + IN OUT PKIRQL oldirql, + IN PVOID Context +); + +NTSTATUS +FASTCALL +FsRtlpUnlockSingle( + IN PFILE_LOCK FileLock, + IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN PLARGE_INTEGER Length, + IN PEPROCESS Process, + IN ULONG Key, + IN PVOID Context OPTIONAL, + IN BOOLEAN CallUnlockRoutine +); + +VOID +FASTCALL +FsRtlpDumpFileLocks(IN PFILE_LOCK FileLock); + +#endif _____ Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h --- trunk/reactos/ntoskrnl/include/internal/i386/ke.h 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/ntoskrnl/include/internal/i386/ke.h 2005-09-14 01:44:19 UTC (rev 17847) @@ -71,6 +71,61 @@ ULONG Eflags; } KIRQ_TRAPFRAME, *PKIRQ_TRAPFRAME; +/* Emulate cli/sti instructions */ +#define KV86M_EMULATE_CLI_STI (0x1) +/* Allow the v86 mode code to access i/o ports */ +#define KV86M_ALLOW_IO_PORT_ACCESS (0x2) + +typedef struct _KV86M_REGISTERS +{ + /* + * General purpose registers + */ + ULONG Ebp; + ULONG Edi; + ULONG Esi; + ULONG Edx; + ULONG Ecx; + ULONG Ebx; + ULONG Eax; + ULONG Ds; + ULONG Es; + ULONG Fs; + ULONG Gs; + + /* + * Control registers + */ + ULONG Eip; + ULONG Cs; + ULONG Eflags; + ULONG Esp; + ULONG Ss; + + /* + * Control structures + */ + ULONG RecoveryAddress; + UCHAR RecoveryInstruction[4]; + ULONG Vif; + ULONG Flags; + PNTSTATUS PStatus; +} KV86M_REGISTERS, *PKV86M_REGISTERS; + +typedef struct _KV86M_TRAP_FRAME +{ + KTRAP_FRAME Tf; + + ULONG SavedExceptionStack; + + /* + * These are put on the top of the stack by the routine that entered + * v86 mode so the exception handlers can find the control information + */ + struct _KV86M_REGISTERS* regs; + ULONG orig_ebp; +} KV86M_TRAP_FRAME, *PKV86M_TRAP_FRAME; + extern ULONG Ke386CacheAlignment; struct _KPCR; _____ Modified: trunk/reactos/ntoskrnl/include/internal/io.h --- trunk/reactos/ntoskrnl/include/internal/io.h 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/ntoskrnl/include/internal/io.h 2005-09-14 01:44:19 UTC (rev 17847) @@ -1,6 +1,8 @@ #ifndef __NTOSKRNL_INCLUDE_INTERNAL_IO_H #define __NTOSKRNL_INCLUDE_INTERNAL_IO_H +#include <ddk/ntdddisk.h> + #define IO_METHOD_FROM_CTL_CODE(ctlCode) (ctlCode&0x00000003) extern POBJECT_TYPE IoCompletionType; @@ -478,4 +480,59 @@ : \ FIELD_OFFSET(CM_RESOURCE_LIST, List) +/* xhal.c */ +NTSTATUS +FASTCALL +xHalQueryDriveLayout( + IN PUNICODE_STRING DeviceName, + OUT PDRIVE_LAYOUT_INFORMATION *LayoutInfo +); + +#undef HalExamineMBR +VOID +FASTCALL +HalExamineMBR( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN ULONG MBRTypeIdentifier, + OUT PVOID *Buffer +); + +VOID +FASTCALL +xHalIoAssignDriveLetters( + IN PLOADER_PARAMETER_BLOCK LoaderBlock, + IN PSTRING NtDeviceName, + OUT PUCHAR NtSystemPath, + OUT PSTRING NtSystemPathString +); + +NTSTATUS +FASTCALL +xHalIoReadPartitionTable( + PDEVICE_OBJECT DeviceObject, + ULONG SectorSize, + BOOLEAN ReturnRecognizedPartitions, + PDRIVE_LAYOUT_INFORMATION *PartitionBuffer +); + +NTSTATUS +FASTCALL +xHalIoSetPartitionInformation( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN ULONG PartitionNumber, + IN ULONG PartitionType +); + +NTSTATUS +FASTCALL +xHalIoWritePartitionTable( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN ULONG SectorsPerTrack, + IN ULONG NumberOfHeads, + IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer +); + #endif _____ Modified: trunk/reactos/ntoskrnl/include/internal/ke.h --- trunk/reactos/ntoskrnl/include/internal/ke.h 2005-09-14 01:05:50 UTC (rev 17846) +++ trunk/reactos/ntoskrnl/include/internal/ke.h 2005-09-14 01:44:19 UTC (rev 17847) @@ -12,8 +12,24 @@ PVOID Wow64; } WOW64_PROCESS, *PWOW64_PROCESS; -/* INTERNAL KERNEL FUNCTIONS ************************************************/ +typedef struct _KPROFILE_SOURCE_OBJECT +{ + KPROFILE_SOURCE Source; + LIST_ENTRY ListEntry; +} KPROFILE_SOURCE_OBJECT, *PKPROFILE_SOURCE_OBJECT; +/* Cached modules from the loader block */ +typedef enum _CACHED_MODULE_TYPE +{ + AnsiCodepage, + OemCodepage, + UnicodeCasemap, + SystemRegistry, + HardwareRegistry, + MaximumCachedModuleType, +} CACHED_MODULE_TYPE, *PCACHED_MODULE_TYPE; +extern PLOADER_MODULE CachedModules[MaximumCachedModuleType]; + struct _KIRQ_TRAPFRAME; struct _KPCR; struct _KPRCB; @@ -23,12 +39,9 @@ extern PVOID KeUserCallbackDispatcher; extern PVOID KeUserExceptionDispatcher; extern PVOID KeRaiseUserExceptionDispatcher; +extern LARGE_INTEGER SystemBootTime; +extern ULONG_PTR KERNEL_BASE; -#define IPI_REQUEST_FUNCTIONCALL 0 -#define IPI_REQUEST_APC 1 -#define IPI_REQUEST_DPC 2 -#define IPI_REQUEST_FREEZE 3 - /* MACROS ************************************************************************ */ #define KeEnterCriticalRegion() \ @@ -49,6 +62,14 @@ } \ } +#define KEBUGCHECKWITHTF(a,b,c,d,e,f) \ + DbgPrint("KeBugCheckWithTf at %s:%i\n",__FILE__,__LINE__), KeBugCheckWithTf(a,b,c,d,e,f) + +#define MAXIMUM_PROCESSORS 32 + + +/* INTERNAL KERNEL FUNCTIONS ************************************************/ + /* threadsch.c ********************************************************************/ /* Thread Scheduler Functions */ @@ -66,17 +87,21 @@ /* Puts a Thread into a block state. */ VOID STDCALL -KiBlockThread(PNTSTATUS Status, - UCHAR Alertable, - ULONG WaitMode, - UCHAR WaitReason); +KiBlockThread( + PNTSTATUS Status, + UCHAR Alertable, + ULONG WaitMode, + UCHAR WaitReason +); /* Removes a thread out of a block state. */ VOID STDCALL -KiUnblockThread(PKTHREAD Thread, - PNTSTATUS WaitStatus, - KPRIORITY Increment); +KiUnblockThread( + PKTHREAD Thread, + PNTSTATUS WaitStatus, + KPRIORITY Increment +); NTSTATUS STDCALL @@ -108,62 +133,59 @@ VOID FASTCALL -KeWaitForGate(PKGATE Gate, - KWAIT_REASON WaitReason, - KPROCESSOR_MODE WaitMode); +KeWaitForGate( + PKGATE Gate, + KWAIT_REASON WaitReason, + KPROCESSOR_MODE WaitMode +); /* ipi.c ********************************************************************/ -BOOLEAN STDCALL -KiIpiServiceRoutine(IN PKTRAP_FRAME TrapFrame, - IN struct _KEXCEPTION_FRAME* ExceptionFrame); +BOOLEAN +STDCALL +KiIpiServiceRoutine( + IN PKTRAP_FRAME TrapFrame, + IN struct _KEXCEPTION_FRAME* ExceptionFrame +); VOID -KiIpiSendRequest(KAFFINITY TargetSet, - ULONG IpiRequest); +NTAPI +KiIpiSendRequest( + KAFFINITY TargetSet, + ULONG IpiRequest +); VOID -KeIpiGenericCall(VOID (STDCALL *WorkerRoutine)(PVOID), - PVOID Argument); +NTAPI +KeIpiGenericCall( + VOID (STDCALL *WorkerRoutine)(PVOID), + PVOID Argument +); /* next file ***************************************************************/ -typedef struct _KPROFILE_SOURCE_OBJECT -{ - KPROFILE_SOURCE Source; - LIST_ENTRY ListEntry; -} KPROFILE_SOURCE_OBJECT, *PKPROFILE_SOURCE_OBJECT; - -/* Cached modules from the loader block */ -typedef enum _CACHED_MODULE_TYPE -{ - AnsiCodepage, - OemCodepage, - UnicodeCasemap, - SystemRegistry, - HardwareRegistry, - MaximumCachedModuleType, -} CACHED_MODULE_TYPE, *PCACHED_MODULE_TYPE; -extern PLOADER_MODULE CachedModules[MaximumCachedModuleType]; - VOID STDCALL DbgBreakPointNoBugCheck(VOID); VOID STDCALL -KeInitializeProfile(struct _KPROFILE* Profile, - struct _KPROCESS* Process, - PVOID ImageBase, - ULONG ImageSize, - ULONG BucketSize, - KPROFILE_SOURCE ProfileSource, - KAFFINITY Affinity); +KeInitializeProfile( + struct _KPROFILE* Profile, + struct _KPROCESS* Process, + PVOID ImageBase, + ULONG ImageSize, + ULONG BucketSize, + KPROFILE_SOURCE ProfileSource, + KAFFINITY Affinity +); VOID STDCALL -KeStartProfile(struct _KPROFILE* Profile, - PVOID Buffer); +KeStartProfile( + struct _KPROFILE* Profile, + PVOID Buffer +); VOID STDCALL @@ -175,8 +197,10 @@ VOID STDCALL -KeSetIntervalProfile(KPROFILE_SOURCE ProfileSource, - ULONG Interval); +KeSetIntervalProfile( + KPROFILE_SOURCE ProfileSource, + ULONG Interval +); VOID STDCALL @@ -187,40 +211,77 @@ VOID STDCALL KeProfileInterruptWithSource( - IN PKTRAP_FRAME TrapFrame, - IN KPROFILE_SOURCE Source + IN PKTRAP_FRAME TrapFrame, + IN KPROFILE_SOURCE Source ); BOOLEAN STDCALL KiRosPrintAddress(PVOID Address); -VOID STDCALL KeUpdateSystemTime(PKTRAP_FRAME TrapFrame, KIRQL Irql); -VOID STDCALL KeUpdateRunTime(PKTRAP_FRAME TrapFrame, KIRQL Irql); +VOID +STDCALL +KeUpdateSystemTime( + PKTRAP_FRAME TrapFrame, + KIRQL Irql +); -VOID STDCALL KiExpireTimers(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2); +VOID +STDCALL +KeUpdateRunTime( + PKTRAP_FRAME TrapFrame, + KIRQL Irql +); -KIRQL inline FASTCALL KeAcquireDispatcherDatabaseLock(VOID); -VOID inline FASTCALL KeAcquireDispatcherDatabaseLockAtDpcLevel(VOID); -VOID inline FASTCALL KeReleaseDispatcherDatabaseLock(KIRQL Irql); -VOID inline FASTCALL KeReleaseDispatcherDatabaseLockFromDpcLevel(VOID); +VOID +STDCALL +KiExpireTimers( + PKDPC Dpc, + PVOID DeferredContext, + PVOID SystemArgument1, + PVOID SystemArgument2 +); +KIRQL +inline +FASTCALL +KeAcquireDispatcherDatabaseLock(VOID); + VOID +__inline +FASTCALL +KeAcquireDispatcherDatabaseLockAtDpcLevel(VOID); + +VOID +__inline +FASTCALL +KeReleaseDispatcherDatabaseLock(KIRQL Irql); + +VOID +__inline +FASTCALL +KeReleaseDispatcherDatabaseLockFromDpcLevel(VOID); + +VOID STDCALL -KeInitializeThread(struct _KPROCESS* Process, - PKTHREAD Thread, - PKSYSTEM_ROUTINE SystemRoutine, - PKSTART_ROUTINE StartRoutine, - PVOID StartContext, - PCONTEXT Context, - PVOID Teb, - PVOID KernelStack); +KeInitializeThread( + struct _KPROCESS* Process, + PKTHREAD Thread, + PKSYSTEM_ROUTINE SystemRoutine, + PKSTART_ROUTINE StartRoutine, + PVOID StartContext, + PCONTEXT Context, + PVOID Teb, + PVOID KernelStack +); VOID STDCALL KeRundownThread(VOID); -NTSTATUS KeReleaseThread(PKTHREAD Thread); +NTSTATUS +NTAPI +KeReleaseThread(PKTHREAD Thread); LONG STDCALL @@ -228,45 +289,62 @@ VOID STDCALL -KiSetPriorityThread(PKTHREAD Thread, - KPRIORITY Priority, - PBOOLEAN Released); +KiSetPriorityThread( + PKTHREAD Thread, + KPRIORITY Priority, + PBOOLEAN Released +); +BOOLEAN +NTAPI +KiDispatcherObjectWake( + DISPATCHER_HEADER* hdr, + KPRIORITY increment +); + VOID STDCALL -KeStackAttachProcess ( - IN struct _KPROCESS* Process, - OUT PKAPC_STATE ApcState - ); +KeExpireTimers( + PKDPC Apc, + PVOID Arg1, + PVOID Arg2, + PVOID Arg3 +); VOID [truncated at 1000 lines; 1204 more skipped]
19 years, 1 month
1
0
0
0
[ion] 17846: ntoskrnl header cleanups
by ion@svn.reactos.com
ntoskrnl header cleanups Modified: trunk/reactos/ntoskrnl/include/internal/mm.h Deleted: trunk/reactos/ntoskrnl/include/internal/nls.h Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Added: trunk/reactos/ntoskrnl/include/internal/rtl.h Modified: trunk/reactos/ntoskrnl/mm/anonmem.c Modified: trunk/reactos/ntoskrnl/mm/aspace.c Modified: trunk/reactos/ntoskrnl/mm/balance.c Modified: trunk/reactos/ntoskrnl/mm/freelist.c Modified: trunk/reactos/ntoskrnl/mm/i386/page.c Modified: trunk/reactos/ntoskrnl/mm/kmap.c Modified: trunk/reactos/ntoskrnl/mm/marea.c Modified: trunk/reactos/ntoskrnl/mm/mdl.c Modified: trunk/reactos/ntoskrnl/mm/mm.c Modified: trunk/reactos/ntoskrnl/mm/mminit.c Modified: trunk/reactos/ntoskrnl/mm/mpw.c Modified: trunk/reactos/ntoskrnl/mm/npool.c Modified: trunk/reactos/ntoskrnl/mm/pagefile.c Modified: trunk/reactos/ntoskrnl/mm/pageop.c Modified: trunk/reactos/ntoskrnl/mm/ppool.c Modified: trunk/reactos/ntoskrnl/mm/region.c Modified: trunk/reactos/ntoskrnl/mm/rmap.c Modified: trunk/reactos/ntoskrnl/mm/section.c Modified: trunk/reactos/ntoskrnl/rtl/nls.c _____ Modified: trunk/reactos/ntoskrnl/include/internal/mm.h --- trunk/reactos/ntoskrnl/include/internal/mm.h 2005-09-13 23:48:54 UTC (rev 17845) +++ trunk/reactos/ntoskrnl/include/internal/mm.h 2005-09-14 01:05:50 UTC (rev 17846) @@ -10,211 +10,260 @@ extern ULONG MmPagedPoolSize; extern ULONG MmTotalPagedPoolQuota; extern ULONG MmTotalNonPagedPoolQuota; +extern PHYSICAL_ADDRESS MmSharedDataPagePhysicalAddress; +extern PVOID MmPagedPoolBase; +extern ULONG MmPagedPoolSize; + +struct _KTRAP_FRAME; struct _EPROCESS; struct _MM_RMAP_ENTRY; -struct _MM_PAGEOP -; +struct _MM_PAGEOP; typedef ULONG SWAPENTRY; typedef ULONG PFN_TYPE, *PPFN_TYPE; -#define MEMORY_AREA_INVALID (0) -#define MEMORY_AREA_SECTION_VIEW (1) -#define MEMORY_AREA_CONTINUOUS_MEMORY (2) -#define MEMORY_AREA_NO_CACHE (3) -#define MEMORY_AREA_IO_MAPPING (4) -#define MEMORY_AREA_SYSTEM (5) -#define MEMORY_AREA_MDL_MAPPING (7) -#define MEMORY_AREA_VIRTUAL_MEMORY (8) -#define MEMORY_AREA_CACHE_SEGMENT (9) -#define MEMORY_AREA_SHARED_DATA (10) -#define MEMORY_AREA_KERNEL_STACK (11) -#define MEMORY_AREA_PAGED_POOL (12) -#define MEMORY_AREA_NO_ACCESS (13) -#define MEMORY_AREA_PEB_OR_TEB (14) +#define MEMORY_AREA_INVALID (0) +#define MEMORY_AREA_SECTION_VIEW (1) +#define MEMORY_AREA_CONTINUOUS_MEMORY (2) +#define MEMORY_AREA_NO_CACHE (3) +#define MEMORY_AREA_IO_MAPPING (4) +#define MEMORY_AREA_SYSTEM (5) +#define MEMORY_AREA_MDL_MAPPING (7) +#define MEMORY_AREA_VIRTUAL_MEMORY (8) +#define MEMORY_AREA_CACHE_SEGMENT (9) +#define MEMORY_AREA_SHARED_DATA (10) +#define MEMORY_AREA_KERNEL_STACK (11) +#define MEMORY_AREA_PAGED_POOL (12) +#define MEMORY_AREA_NO_ACCESS (13) +#define MEMORY_AREA_PEB_OR_TEB (14) +#define MM_PHYSICAL_PAGE_MPW_PENDING (0x8) + +#define MM_CORE_DUMP_TYPE_NONE (0x0) +#define MM_CORE_DUMP_TYPE_MINIMAL (0x1) +#define MM_CORE_DUMP_TYPE_FULL (0x2) + +#define MM_PAGEOP_PAGEIN (1) +#define MM_PAGEOP_PAGEOUT (2) +#define MM_PAGEOP_PAGESYNCH (3) +#define MM_PAGEOP_ACCESSFAULT (4) + #define PAGE_TO_SECTION_PAGE_DIRECTORY_OFFSET(x) \ - ((x) / (4*1024*1024)) + ((x) / (4*1024*1024)) + #define PAGE_TO_SECTION_PAGE_TABLE_OFFSET(x) \ - ((((x)) % (4*1024*1024)) / (4*1024)) + ((((x)) % (4*1024*1024)) / (4*1024)) -#define NR_SECTION_PAGE_TABLES (1024) -#define NR_SECTION_PAGE_ENTRIES (1024) +#define NR_SECTION_PAGE_TABLES 1024 +#define NR_SECTION_PAGE_ENTRIES 1024 -#define TEB_BASE (0x7FFDE000) -#define KPCR_BASE 0xFF000000 +#define TEB_BASE 0x7FFDE000 +#define KPCR_BASE 0xFF000000 /* Although Microsoft says this isn't hardcoded anymore, they won't be able to change it. Stuff depends on it */ -#define MM_VIRTMEM_GRANULARITY (64 * 1024) +#define MM_VIRTMEM_GRANULARITY (64 * 1024) -#define STATUS_MM_RESTART_OPERATION ((NTSTATUS)0xD0000001) +#define STATUS_MM_RESTART_OPERATION ((NTSTATUS)0xD0000001) /* * Additional flags for protection attributes */ -#define PAGE_WRITETHROUGH (1024) -#define PAGE_SYSTEM (2048) -#define PAGE_FLAGS_VALID_FROM_USER_MODE (PAGE_READONLY | \ - PAGE_READWRITE | \ - PAGE_WRITECOPY | \ - PAGE_EXECUTE | \ - PAGE_EXECUTE_READ | \ - PAGE_EXECUTE_READWRITE | \ - PAGE_EXECUTE_WRITECOPY | \ - PAGE_GUARD | \ - PAGE_NOACCESS | \ - PAGE_NOCACHE) +#define PAGE_WRITETHROUGH (1024) +#define PAGE_SYSTEM (2048) -#define PAGE_IS_READABLE (PAGE_READONLY | \ - PAGE_READWRITE | \ - PAGE_WRITECOPY | \ - PAGE_EXECUTE_READ | \ - PAGE_EXECUTE_READWRITE | \ - PAGE_EXECUTE_WRITECOPY) +#define SEC_PHYSICALMEMORY (0x80000000) -#define PAGE_IS_WRITABLE (PAGE_READWRITE | \ - PAGE_WRITECOPY | \ - PAGE_EXECUTE_READWRITE | \ - PAGE_EXECUTE_WRITECOPY) +#define MM_PAGEFILE_SEGMENT (0x1) +#define MM_DATAFILE_SEGMENT (0x2) -#define PAGE_IS_EXECUTABLE (PAGE_EXECUTE | \ - PAGE_EXECUTE_READ | \ - PAGE_EXECUTE_READWRITE | \ - PAGE_EXECUTE_WRITECOPY) +#define MC_CACHE (0) +#define MC_USER (1) +#define MC_PPOOL (2) +#define MC_NPPOOL (3) +#define MC_MAXIMUM (4) -#define PAGE_IS_WRITECOPY (PAGE_WRITECOPY | \ - PAGE_EXECUTE_WRITECOPY) +#define PAGED_POOL_MASK 1 +#define MUST_SUCCEED_POOL_MASK 2 +#define CACHE_ALIGNED_POOL_MASK 4 +#define QUOTA_POOL_MASK 8 +#define SESSION_POOL_MASK 32 +#define VERIFIER_POOL_MASK 64 +#define MM_PAGED_POOL_SIZE (100*1024*1024) +#define MM_NONPAGED_POOL_SIZE (100*1024*1024) + +/* + * Paged and non-paged pools are 8-byte aligned + */ +#define MM_POOL_ALIGNMENT 8 + +/* + * Maximum size of the kmalloc area (this is totally arbitary) + */ +#define MM_KERNEL_MAP_SIZE (16*1024*1024) +#define MM_KERNEL_MAP_BASE (0xf0c00000) + +/* + * FIXME - different architectures have different cache line sizes... + */ +#define MM_CACHE_LINE_SIZE 32 + +#define MM_ROUND_UP(x,s) \ + ((PVOID)(((ULONG_PTR)(x)+(s)-1) & ~((ULONG_PTR)(s)-1))) + +#define MM_ROUND_DOWN(x,s) \ + ((PVOID)(((ULONG_PTR)(x)) & ~((ULONG_PTR)(s)-1))) + +#define PAGE_FLAGS_VALID_FROM_USER_MODE \ + (PAGE_READONLY | \ + PAGE_READWRITE | \ + PAGE_WRITECOPY | \ + PAGE_EXECUTE | \ + PAGE_EXECUTE_READ | \ + PAGE_EXECUTE_READWRITE | \ + PAGE_EXECUTE_WRITECOPY | \ + PAGE_GUARD | \ + PAGE_NOACCESS | \ + PAGE_NOCACHE) + +#define PAGE_IS_READABLE \ + (PAGE_READONLY | \ + PAGE_READWRITE | \ + PAGE_WRITECOPY | \ + PAGE_EXECUTE_READ | \ + PAGE_EXECUTE_READWRITE | \ + PAGE_EXECUTE_WRITECOPY) + +#define PAGE_IS_WRITABLE \ + (PAGE_READWRITE | \ + PAGE_WRITECOPY | \ + PAGE_EXECUTE_READWRITE | \ + PAGE_EXECUTE_WRITECOPY) + +#define PAGE_IS_EXECUTABLE \ + (PAGE_EXECUTE | \ + PAGE_EXECUTE_READ | \ + PAGE_EXECUTE_READWRITE | \ + PAGE_EXECUTE_WRITECOPY) + +#define PAGE_IS_WRITECOPY \ + (PAGE_WRITECOPY | \ + PAGE_EXECUTE_WRITECOPY) + typedef struct { - ULONG Entry[NR_SECTION_PAGE_ENTRIES]; + ULONG Entry[NR_SECTION_PAGE_ENTRIES]; } SECTION_PAGE_TABLE, *PSECTION_PAGE_TABLE; typedef struct { - PSECTION_PAGE_TABLE PageTables[NR_SECTION_PAGE_TABLES]; + PSECTION_PAGE_TABLE PageTables[NR_SECTION_PAGE_TABLES]; } SECTION_PAGE_DIRECTORY, *PSECTION_PAGE_DIRECTORY; -#define SEC_PHYSICALMEMORY (0x80000000) - -#define MM_PAGEFILE_SEGMENT (0x1) -#define MM_DATAFILE_SEGMENT (0x2) - typedef struct _MM_SECTION_SEGMENT { - LONGLONG FileOffset; - ULONG_PTR VirtualAddress; - ULONG RawLength; - ULONG Length; - ULONG Protection; - FAST_MUTEX Lock; - ULONG ReferenceCount; - SECTION_PAGE_DIRECTORY PageDirectory; - ULONG Flags; - ULONG Characteristics; - BOOLEAN WriteCopy; + LONGLONG FileOffset; + ULONG_PTR VirtualAddress; + ULONG RawLength; + ULONG Length; + ULONG Protection; + FAST_MUTEX Lock; + ULONG ReferenceCount; + SECTION_PAGE_DIRECTORY PageDirectory; + ULONG Flags; + ULONG Characteristics; + BOOLEAN WriteCopy; } MM_SECTION_SEGMENT, *PMM_SECTION_SEGMENT; typedef struct _MM_IMAGE_SECTION_OBJECT { - ULONG_PTR ImageBase; - ULONG_PTR StackReserve; - ULONG_PTR StackCommit; - ULONG_PTR EntryPoint; - ULONG Subsystem; - ULONG ImageCharacteristics; - USHORT MinorSubsystemVersion; - USHORT MajorSubsystemVersion; - USHORT Machine; - BOOLEAN Executable; - ULONG NrSegments; - PMM_SECTION_SEGMENT Segments; + ULONG_PTR ImageBase; + ULONG_PTR StackReserve; + ULONG_PTR StackCommit; + ULONG_PTR EntryPoint; + ULONG Subsystem; + ULONG ImageCharacteristics; + USHORT MinorSubsystemVersion; + USHORT MajorSubsystemVersion; + USHORT Machine; + BOOLEAN Executable; + ULONG NrSegments; + PMM_SECTION_SEGMENT Segments; } MM_IMAGE_SECTION_OBJECT, *PMM_IMAGE_SECTION_OBJECT; typedef struct _SECTION_OBJECT { - CSHORT Type; - CSHORT Size; - LARGE_INTEGER MaximumSize; - ULONG SectionPageProtection; - ULONG AllocationAttributes; - PFILE_OBJECT FileObject; - union - { - PMM_IMAGE_SECTION_OBJECT ImageSection; - PMM_SECTION_SEGMENT Segment; - }; + CSHORT Type; + CSHORT Size; + LARGE_INTEGER MaximumSize; + ULONG SectionPageProtection; + ULONG AllocationAttributes; + PFILE_OBJECT FileObject; + union + { + PMM_IMAGE_SECTION_OBJECT ImageSection; + PMM_SECTION_SEGMENT Segment; + }; } SECTION_OBJECT; typedef struct _MEMORY_AREA { - PVOID StartingAddress; - PVOID EndingAddress; - struct _MEMORY_AREA *Parent; - struct _MEMORY_AREA *LeftChild; - struct _MEMORY_AREA *RightChild; - ULONG Type; - ULONG Attributes; - ULONG LockCount; - BOOLEAN DeleteInProgress; - ULONG PageOpCount; - union - { - struct + PVOID StartingAddress; + PVOID EndingAddress; + struct _MEMORY_AREA *Parent; + struct _MEMORY_AREA *LeftChild; + struct _MEMORY_AREA *RightChild; + ULONG Type; + ULONG Attributes; + ULONG LockCount; + BOOLEAN DeleteInProgress; + ULONG PageOpCount; + union { - SECTION_OBJECT* Section; - ULONG ViewOffset; - PMM_SECTION_SEGMENT Segment; - BOOLEAN WriteCopyView; - LIST_ENTRY RegionListHead; - } SectionData; - struct - { - LIST_ENTRY RegionListHead; - } VirtualMemoryData; - } Data; + struct + { + SECTION_OBJECT* Section; + ULONG ViewOffset; + PMM_SECTION_SEGMENT Segment; + BOOLEAN WriteCopyView; + LIST_ENTRY RegionListHead; + } SectionData; + struct + { + LIST_ENTRY RegionListHead; + } VirtualMemoryData; + } Data; } MEMORY_AREA, *PMEMORY_AREA; #ifndef _MMTYPES_H typedef struct _MADDRESS_SPACE { - PMEMORY_AREA MemoryAreaRoot; - FAST_MUTEX Lock; - PVOID LowestAddress; - struct _EPROCESS* Process; - PUSHORT PageTableRefCountTable; - ULONG PageTableRefCountTableSize; + PMEMORY_AREA MemoryAreaRoot; + FAST_MUTEX Lock; + PVOID LowestAddress; + struct _EPROCESS* Process; + PUSHORT PageTableRefCountTable; + ULONG PageTableRefCountTableSize; } MADDRESS_SPACE, *PMADDRESS_SPACE; #endif typedef struct { - ULONG NrTotalPages; - ULONG NrSystemPages; - ULONG NrReservedPages; - ULONG NrUserPages; - ULONG NrFreePages; - ULONG NrDirtyPages; - ULONG NrLockedPages; - ULONG PagingRequestsInLastMinute; - ULONG PagingRequestsInLastFiveMinutes; - ULONG PagingRequestsInLastFifteenMinutes; + ULONG NrTotalPages; + ULONG NrSystemPages; + ULONG NrReservedPages; + ULONG NrUserPages; + ULONG NrFreePages; + ULONG NrDirtyPages; + ULONG NrLockedPages; + ULONG PagingRequestsInLastMinute; + ULONG PagingRequestsInLastFiveMinutes; + ULONG PagingRequestsInLastFifteenMinutes; } MM_STATS; extern MM_STATS MmStats; -#define MM_PHYSICAL_PAGE_MPW_PENDING (0x8) - -#define MM_CORE_DUMP_TYPE_NONE (0x0) -#define MM_CORE_DUMP_TYPE_MINIMAL (0x1) -#define MM_CORE_DUMP_TYPE_FULL (0x2) - -#define MM_PAGEOP_PAGEIN (1) -#define MM_PAGEOP_PAGEOUT (2) -#define MM_PAGEOP_PAGESYNCH (3) -#define MM_PAGEOP_ACCESSFAULT (4) - typedef struct _MM_PAGEOP { /* Type of operation. */ @@ -246,256 +295,335 @@ ULONG Offset; } MM_PAGEOP, *PMM_PAGEOP; -#define MC_CACHE (0) -#define MC_USER (1) -#define MC_PPOOL (2) -#define MC_NPPOOL (3) -#define MC_MAXIMUM (4) - typedef struct _MM_MEMORY_CONSUMER { - ULONG PagesUsed; - ULONG PagesTarget; - NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed); -} -MM_MEMORY_CONSUMER, *PMM_MEMORY_CONSUMER; + ULONG PagesUsed; + ULONG PagesTarget; + NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed); +} MM_MEMORY_CONSUMER, *PMM_MEMORY_CONSUMER; -extern MM_MEMORY_CONSUMER MiMemoryConsumers[MC_MAXIMUM]; - -extern PHYSICAL_ADDRESS MmSharedDataPagePhysicalAddress; -struct _KTRAP_FRAME; - -typedef VOID (*PMM_ALTER_REGION_FUNC)(PMADDRESS_SPACE AddressSpace, - PVOID BaseAddress, ULONG Length, - ULONG OldType, ULONG OldProtect, - ULONG NewType, ULONG NewProtect); - typedef struct _MM_REGION { - ULONG Type; - ULONG Protect; - ULONG Length; - LIST_ENTRY RegionListEntry; + ULONG Type; + ULONG Protect; + ULONG Length; + LIST_ENTRY RegionListEntry; } MM_REGION, *PMM_REGION; -typedef VOID (*PMM_FREE_PAGE_FUNC)(PVOID Context, PMEMORY_AREA MemoryArea, - PVOID Address, PFN_TYPE Page, - SWAPENTRY SwapEntry, BOOLEAN Dirty); +extern MM_MEMORY_CONSUMER MiMemoryConsumers[MC_MAXIMUM]; -PVOID STDCALL ExAllocateNonPagedPoolWithTag (POOL_TYPE type, - ULONG size, - ULONG Tag, - PVOID Caller); +typedef VOID +(*PMM_ALTER_REGION_FUNC)( + PMADDRESS_SPACE AddressSpace, + PVOID BaseAddress, + ULONG Length, + ULONG OldType, + ULONG OldProtect, + ULONG NewType, + ULONG NewProtect +); -PVOID STDCALL ExAllocatePagedPoolWithTag (POOL_TYPE Type, - ULONG size, - ULONG Tag); -VOID STDCALL ExFreeNonPagedPool (PVOID block); +typedef VOID +(*PMM_FREE_PAGE_FUNC)( + PVOID Context, + PMEMORY_AREA MemoryArea, + PVOID Address, + PFN_TYPE Page, + SWAPENTRY SwapEntry, + BOOLEAN Dirty +); -VOID STDCALL -ExFreePagedPool(IN PVOID Block); -VOID MmInitializePagedPool(VOID); -PVOID -STDCALL -MiAllocateSpecialPool (IN POOL_TYPE PoolType, - IN SIZE_T NumberOfBytes, - IN ULONG Tag, - IN ULONG Underrun - ); - -extern PVOID MmPagedPoolBase; -extern ULONG MmPagedPoolSize; - -#define PAGED_POOL_MASK 1 -#define MUST_SUCCEED_POOL_MASK 2 -#define CACHE_ALIGNED_POOL_MASK 4 -#define QUOTA_POOL_MASK 8 -#define SESSION_POOL_MASK 32 -#define VERIFIER_POOL_MASK 64 - -#define MM_PAGED_POOL_SIZE (100*1024*1024) -#define MM_NONPAGED_POOL_SIZE (100*1024*1024) - -/* - * Paged and non-paged pools are 8-byte aligned - */ -#define MM_POOL_ALIGNMENT 8 - -/* - * Maximum size of the kmalloc area (this is totally arbitary) - */ -#define MM_KERNEL_MAP_SIZE (16*1024*1024) -#define MM_KERNEL_MAP_BASE (0xf0c00000) - -/* - * FIXME - different architectures have different cache line sizes... - */ -#define MM_CACHE_LINE_SIZE 32 - -#define MM_ROUND_UP(x,s) ((PVOID)(((ULONG_PTR)(x)+(s)-1) & ~((ULONG_PTR)(s)-1))) -#define MM_ROUND_DOWN(x,s) ((PVOID)(((ULONG_PTR)(x)) & ~((ULONG_PTR)(s)-1))) - /* FUNCTIONS */ /* aspace.c ******************************************************************/ -VOID MmLockAddressSpace(PMADDRESS_SPACE AddressSpace); +VOID +NTAPI +MmLockAddressSpace(PMADDRESS_SPACE AddressSpace); -VOID MmUnlockAddressSpace(PMADDRESS_SPACE AddressSpace); +VOID +NTAPI +MmUnlockAddressSpace(PMADDRESS_SPACE AddressSpace); -VOID MmInitializeKernelAddressSpace(VOID); +VOID +NTAPI +MmInitializeKernelAddressSpace(VOID); -PMADDRESS_SPACE MmGetCurrentAddressSpace(VOID); +PMADDRESS_SPACE +NTAPI +MmGetCurrentAddressSpace(VOID); -PMADDRESS_SPACE MmGetKernelAddressSpace(VOID); +PMADDRESS_SPACE +NTAPI +MmGetKernelAddressSpace(VOID); -NTSTATUS MmInitializeAddressSpace(struct _EPROCESS* Process, - PMADDRESS_SPACE AddressSpace); +NTSTATUS +NTAPI +MmInitializeAddressSpace( + struct _EPROCESS* Process, + PMADDRESS_SPACE AddressSpace); -NTSTATUS MmDestroyAddressSpace(PMADDRESS_SPACE AddressSpace); +NTSTATUS +NTAPI +MmDestroyAddressSpace(PMADDRESS_SPACE AddressSpace); /* marea.c *******************************************************************/ NTSTATUS +NTAPI MmInitMemoryAreas(VOID); -NTSTATUS STDCALL +NTSTATUS +STDCALL MmCreateMemoryArea( - struct _EPROCESS* Process, - PMADDRESS_SPACE AddressSpace, - ULONG Type, - PVOID *BaseAddress, - ULONG_PTR Length, - ULONG Attributes, - PMEMORY_AREA *Result, - BOOLEAN FixedAddress, - BOOLEAN TopDown, - PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL); + struct _EPROCESS* Process, + PMADDRESS_SPACE AddressSpace, + ULONG Type, + PVOID *BaseAddress, + ULONG_PTR Length, + ULONG Attributes, + PMEMORY_AREA *Result, + BOOLEAN FixedAddress, + BOOLEAN TopDown, + PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL +); -PMEMORY_AREA STDCALL +PMEMORY_AREA +STDCALL MmLocateMemoryAreaByAddress( - PMADDRESS_SPACE AddressSpace, - PVOID Address); + PMADDRESS_SPACE AddressSpace, + PVOID Address +); -ULONG_PTR STDCALL +ULONG_PTR +STDCALL MmFindGapAtAddress( - PMADDRESS_SPACE AddressSpace, - PVOID Address); + PMADDRESS_SPACE AddressSpace, + PVOID Address +); -NTSTATUS STDCALL +NTSTATUS +STDCALL MmFreeMemoryArea( - PMADDRESS_SPACE AddressSpace, - PMEMORY_AREA MemoryArea, - PMM_FREE_PAGE_FUNC FreePage, - PVOID FreePageContext); + PMADDRESS_SPACE AddressSpace, + PMEMORY_AREA MemoryArea, + PMM_FREE_PAGE_FUNC FreePage, + PVOID FreePageContext +); -NTSTATUS STDCALL +NTSTATUS +STDCALL MmFreeMemoryAreaByPtr( - PMADDRESS_SPACE AddressSpace, - PVOID BaseAddress, - PMM_FREE_PAGE_FUNC FreePage, - PVOID FreePageContext); + PMADDRESS_SPACE AddressSpace, + PVOID BaseAddress, + PMM_FREE_PAGE_FUNC FreePage, + PVOID FreePageContext +); -VOID STDCALL +VOID +STDCALL MmDumpMemoryAreas(PMADDRESS_SPACE AddressSpace); -PMEMORY_AREA STDCALL +PMEMORY_AREA +STDCALL MmLocateMemoryAreaByRegion( - PMADDRESS_SPACE AddressSpace, - PVOID Address, - ULONG_PTR Length); + PMADDRESS_SPACE AddressSpace, + PVOID Address, + ULONG_PTR Length +); -PVOID STDCALL +PVOID +STDCALL MmFindGap( - PMADDRESS_SPACE AddressSpace, - ULONG_PTR Length, - ULONG_PTR Granularity, - BOOLEAN TopDown); + PMADDRESS_SPACE AddressSpace, + ULONG_PTR Length, + ULONG_PTR Granularity, + BOOLEAN TopDown +); -VOID STDCALL +VOID +STDCALL MmReleaseMemoryAreaIfDecommitted( - PEPROCESS Process, - PMADDRESS_SPACE AddressSpace, - PVOID BaseAddress); + PEPROCESS Process, + PMADDRESS_SPACE AddressSpace, + PVOID BaseAddress +); /* npool.c *******************************************************************/ -VOID MiDebugDumpNonPagedPool(BOOLEAN NewOnly); +VOID +NTAPI +MiDebugDumpNonPagedPool(BOOLEAN NewOnly); -VOID MiDebugDumpNonPagedPoolStats(BOOLEAN NewOnly); +VOID +NTAPI +MiDebugDumpNonPagedPoolStats(BOOLEAN NewOnly); -VOID MiInitializeNonPagedPool(VOID); +VOID +NTAPI +MiInitializeNonPagedPool(VOID); -PVOID MmGetMdlPageAddress(PMDL Mdl, PVOID Offset); +PVOID +NTAPI +MmGetMdlPageAddress( + PMDL Mdl, + PVOID Offset +); /* pool.c *******************************************************************/ +PVOID +STDCALL +ExAllocateNonPagedPoolWithTag( + POOL_TYPE type, + ULONG size, + ULONG Tag, + PVOID Caller +); + +PVOID +STDCALL +ExAllocatePagedPoolWithTag( + POOL_TYPE Type, + ULONG size, + ULONG Tag +); + +VOID +STDCALL +ExFreeNonPagedPool(PVOID block); + +VOID +STDCALL +ExFreePagedPool(IN PVOID Block); + +VOID +NTAPI +MmInitializePagedPool(VOID); + +PVOID +STDCALL +MiAllocateSpecialPool( + IN POOL_TYPE PoolType, + IN SIZE_T NumberOfBytes, + IN ULONG Tag, + IN ULONG Underrun +); + BOOLEAN STDCALL MiRaisePoolQuota( IN POOL_TYPE PoolType, IN ULONG CurrentMaxQuota, OUT PULONG NewMaxQuota - ); +); /* mdl.c *********************************************************************/ -VOID MmBuildMdlFromPages(PMDL Mdl, PULONG Pages); +VOID +NTAPI +MmBuildMdlFromPages( + PMDL Mdl, + PULONG Pages +); /* mminit.c ******************************************************************/ -VOID MiShutdownMemoryManager(VOID); +VOID +NTAPI +MiShutdownMemoryManager(VOID); -VOID MmInit1(ULONG_PTR FirstKernelPhysAddress, - ULONG_PTR LastKernelPhysAddress, - ULONG_PTR LastKernelAddress, - PADDRESS_RANGE BIOSMemoryMap, - ULONG AddressRangeCount, - ULONG MaxMemInMeg); +VOID +NTAPI +MmInit1( + ULONG_PTR FirstKernelPhysAddress, + ULONG_PTR LastKernelPhysAddress, + ULONG_PTR LastKernelAddress, + PADDRESS_RANGE BIOSMemoryMap, + ULONG AddressRangeCount, + ULONG MaxMemInMeg +); -VOID MmInit2(VOID); +VOID +NTAPI +MmInit2(VOID); -VOID MmInit3(VOID); +VOID +NTAPI +MmInit3(VOID); -VOID MiFreeInitMemory(VOID); +VOID +NTAPI +MiFreeInitMemory(VOID); -VOID MmInitializeMdlImplementation(VOID); +VOID +NTAPI +MmInitializeMdlImplementation(VOID); /* pagefile.c ****************************************************************/ -SWAPENTRY MmAllocSwapPage(VOID); +SWAPENTRY +NTAPI +MmAllocSwapPage(VOID); -VOID MmDereserveSwapPages(ULONG Nr); +VOID +NTAPI +MmDereserveSwapPages(ULONG Nr); -VOID MmFreeSwapPage(SWAPENTRY Entry); +VOID +NTAPI +MmFreeSwapPage(SWAPENTRY Entry); -VOID MmInitPagingFile(VOID); +VOID +NTAPI +MmInitPagingFile(VOID); -NTSTATUS MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page); +NTSTATUS +NTAPI +MmReadFromSwapPage( + SWAPENTRY SwapEntry, + PFN_TYPE Page +); -BOOLEAN MmReserveSwapPages(ULONG Nr); +BOOLEAN +NTAPI +MmReserveSwapPages(ULONG Nr); -NTSTATUS MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page); +NTSTATUS +NTAPI +MmWriteToSwapPage( + SWAPENTRY SwapEntry, + PFN_TYPE Page +); -NTSTATUS STDCALL -MmDumpToPagingFile(ULONG BugCode, - ULONG BugCodeParameter1, - ULONG BugCodeParameter2, - ULONG BugCodeParameter3, - ULONG BugCodeParameter4, - struct _KTRAP_FRAME* TrapFrame); +NTSTATUS +STDCALL +MmDumpToPagingFile( + ULONG BugCode, + ULONG BugCodeParameter1, + ULONG BugCodeParameter2, + ULONG BugCodeParameter3, + ULONG BugCodeParameter4, + struct _KTRAP_FRAME* TrapFrame +); -BOOLEAN MmIsAvailableSwapPage(VOID); +BOOLEAN +NTAPI +MmIsAvailableSwapPage(VOID); -VOID MmShowOutOfSpaceMessagePagingFile(VOID); +VOID +NTAPI +MmShowOutOfSpaceMessagePagingFile(VOID); /* process.c ****************************************************************/ NTSTATUS STDCALL -MmCreateProcessAddressSpace(IN struct _EPROCESS* Process, - IN PSECTION_OBJECT Section OPTIONAL); +MmCreateProcessAddressSpace( + IN struct _EPROCESS* Process, + IN PSECTION_OBJECT Section OPTIONAL +); NTSTATUS STDCALL @@ -503,92 +631,166 @@ struct _TEB* STDCALL -MmCreateTeb(PEPROCESS Process, - PCLIENT_ID ClientId, - PINITIAL_TEB InitialTeb); +MmCreateTeb( + PEPROCESS Process, + PCLIENT_ID ClientId, + PINITIAL_TEB InitialTeb +); VOID STDCALL -MmDeleteTeb(PEPROCESS Process, - struct _TEB* Teb); +MmDeleteTeb( + PEPROCESS Process, + struct _TEB* Teb +); /* i386/pfault.c *************************************************************/ -NTSTATUS MmPageFault(ULONG Cs, - PULONG Eip, - PULONG Eax, - ULONG Cr2, - ULONG ErrorCode); +NTSTATUS +NTAPI +MmPageFault( + ULONG Cs, + PULONG Eip, + PULONG Eax, + ULONG Cr2, + ULONG ErrorCode +); /* mm.c **********************************************************************/ -NTSTATUS MmAccessFault(KPROCESSOR_MODE Mode, - ULONG_PTR Address, - BOOLEAN FromMdl); +NTSTATUS +NTAPI +MmAccessFault( + KPROCESSOR_MODE Mode, + ULONG_PTR Address, + BOOLEAN FromMdl +); -NTSTATUS MmNotPresentFault(KPROCESSOR_MODE Mode, - ULONG_PTR Address, - BOOLEAN FromMdl); +NTSTATUS +NTAPI +MmNotPresentFault( + KPROCESSOR_MODE Mode, + ULONG_PTR Address, + BOOLEAN FromMdl +); /* anonmem.c *****************************************************************/ -NTSTATUS MmNotPresentFaultVirtualMemory(PMADDRESS_SPACE AddressSpace, - MEMORY_AREA* MemoryArea, - PVOID Address, - BOOLEAN Locked); +NTSTATUS +NTAPI +MmNotPresentFaultVirtualMemory( + PMADDRESS_SPACE AddressSpace, + MEMORY_AREA* MemoryArea, + PVOID Address, + BOOLEAN Locked +); -NTSTATUS MmPageOutVirtualMemory(PMADDRESS_SPACE AddressSpace, - PMEMORY_AREA MemoryArea, - PVOID Address, - struct _MM_PAGEOP* PageOp); -NTSTATUS STDCALL -MmQueryAnonMem(PMEMORY_AREA MemoryArea, - PVOID Address, - PMEMORY_BASIC_INFORMATION Info, - PULONG ResultLength); +NTSTATUS +NTAPI +MmPageOutVirtualMemory( + PMADDRESS_SPACE AddressSpace, + PMEMORY_AREA MemoryArea, [truncated at 1000 lines; 2364 more skipped]
19 years, 1 month
1
0
0
0
[ion] 17845: ntoskrnl header cleanups
by ion@svn.reactos.com
ntoskrnl header cleanups Modified: trunk/reactos/include/ndk/pstypes.h Modified: trunk/reactos/ntoskrnl/include/internal/ob.h Modified: trunk/reactos/ntoskrnl/include/internal/po.h Modified: trunk/reactos/ntoskrnl/include/internal/port.h Modified: trunk/reactos/ntoskrnl/lpc/port.c Modified: trunk/reactos/ntoskrnl/ob/handle.c Modified: trunk/reactos/ntoskrnl/ob/namespc.c Modified: trunk/reactos/ntoskrnl/ob/object.c Modified: trunk/reactos/ntoskrnl/ob/sdcache.c Modified: trunk/reactos/ntoskrnl/ob/symlink.c Modified: trunk/reactos/ntoskrnl/po/power.c _____ Modified: trunk/reactos/include/ndk/pstypes.h --- trunk/reactos/include/ndk/pstypes.h 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/include/ndk/pstypes.h 2005-09-13 23:48:54 UTC (rev 17845) @@ -499,6 +499,12 @@ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; } PS_IMPERSONATION_INFORMATION, *PPS_IMPERSONATION_INFORMATION; +typedef struct _TERMINATION_PORT +{ + struct _TERMINATION_PORT *Next; + PVOID Port; +} TERMINATION_PORT, *PTERMINATION_PORT; + #include <pshpack4.h> typedef struct _ETHREAD { _____ Modified: trunk/reactos/ntoskrnl/include/internal/ob.h --- trunk/reactos/ntoskrnl/include/internal/ob.h 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/include/internal/ob.h 2005-09-13 23:48:54 UTC (rev 17845) @@ -11,42 +11,40 @@ struct _EPROCESS; +#define ICIF_QUERY 0x1 +#define ICIF_SET 0x2 +#define ICIF_QUERY_SIZE_VARIABLE 0x4 +#define ICIF_SET_SIZE_VARIABLE 0x8 +#define ICIF_SIZE_VARIABLE (ICIF_QUERY_SIZE_VARIABLE | ICIF_SET_SIZE_VARIABLE) + typedef struct _DIRECTORY_OBJECT { - CSHORT Type; - CSHORT Size; + CSHORT Type; + CSHORT Size; /* * PURPOSE: Head of the list of our subdirectories */ - LIST_ENTRY head; - KSPIN_LOCK Lock; + LIST_ENTRY head; + KSPIN_LOCK Lock; } DIRECTORY_OBJECT, *PDIRECTORY_OBJECT; typedef struct _SYMLINK_OBJECT { - CSHORT Type; - CSHORT Size; - UNICODE_STRING TargetName; - LARGE_INTEGER CreateTime; + CSHORT Type; + CSHORT Size; + UNICODE_STRING TargetName; + LARGE_INTEGER CreateTime; } SYMLINK_OBJECT, *PSYMLINK_OBJECT; -/* - * Enumeration of object types - */ -enum +typedef struct _INFORMATION_CLASS_INFO { - OBJTYP_INVALID, - OBJTYP_TYPE, - OBJTYP_DIRECTORY, - OBJTYP_SYMLNK, - OBJTYP_DEVICE, - OBJTYP_THREAD, - OBJTYP_FILE, - OBJTYP_PROCESS, - OBJTYP_SECTION, - OBJTYP_MAX, -}; + ULONG RequiredSizeQUERY; + ULONG RequiredSizeSET; + ULONG AlignmentSET; + ULONG AlignmentQUERY; + ULONG Flags; +} INFORMATION_CLASS_INFO, *PINFORMATION_CLASS_INFO; #define BODY_TO_HEADER(objbdy) \ CONTAINING_RECORD((objbdy), OBJECT_HEADER, Body) @@ -62,10 +60,6 @@ #define OBJECT_ALLOC_SIZE(ObjectSize) ((ObjectSize)+sizeof(OBJECT_HEADER)) -extern PDIRECTORY_OBJECT NameSpaceRoot; -extern POBJECT_TYPE ObSymbolicLinkType; -extern PHANDLE_TABLE ObpKernelHandleTable; - #define KERNEL_HANDLE_FLAG (1 << ((sizeof(HANDLE) * 8) - 1)) #define ObIsKernelHandle(Handle, ProcessorMode) \ (((ULONG_PTR)(Handle) & KERNEL_HANDLE_FLAG) && \ @@ -73,94 +67,152 @@ #define ObKernelHandleToHandle(Handle) \ (HANDLE)((ULONG_PTR)(Handle) & ~KERNEL_HANDLE_FLAG) -VOID ObpAddEntryDirectory(PDIRECTORY_OBJECT Parent, - POBJECT_HEADER Header, - PWSTR Name); -VOID ObpRemoveEntryDirectory(POBJECT_HEADER Header); +extern PDIRECTORY_OBJECT NameSpaceRoot; +extern POBJECT_TYPE ObSymbolicLinkType; +extern PHANDLE_TABLE ObpKernelHandleTable; VOID +NTAPI +ObpAddEntryDirectory( + PDIRECTORY_OBJECT Parent, + POBJECT_HEADER Header, + PWSTR Name +); + +VOID +NTAPI +ObpRemoveEntryDirectory(POBJECT_HEADER Header); + +VOID +NTAPI ObInitSymbolicLinkImplementation(VOID); +NTSTATUS +NTAPI +ObpCreateHandle( + struct _EPROCESS* Process, + PVOID ObjectBody, + ACCESS_MASK GrantedAccess, + BOOLEAN Inherit, + PHANDLE Handle +); -NTSTATUS ObpCreateHandle(struct _EPROCESS* Process, - PVOID ObjectBody, - ACCESS_MASK GrantedAccess, - BOOLEAN Inherit, - PHANDLE Handle); -VOID ObCreateHandleTable(struct _EPROCESS* Parent, - BOOLEAN Inherit, - struct _EPROCESS* Process); -NTSTATUS ObFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo, - PUNICODE_STRING ObjectName, - PVOID* ReturnedObject, - PUNICODE_STRING RemainingPath, - POBJECT_TYPE ObjectType); +VOID +NTAPI +ObCreateHandleTable( + struct _EPROCESS* Parent, + BOOLEAN Inherit, + struct _EPROCESS* Process +); NTSTATUS -ObpQueryHandleAttributes(HANDLE Handle, - POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo); +NTAPI +ObFindObject( + POBJECT_CREATE_INFORMATION ObjectCreateInfo, + PUNICODE_STRING ObjectName, + PVOID* ReturnedObject, + PUNICODE_STRING RemainingPath, + POBJECT_TYPE ObjectType +); NTSTATUS -ObpSetHandleAttributes(HANDLE Handle, - POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo); +NTAPI +ObpQueryHandleAttributes( + HANDLE Handle, + POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo +); NTSTATUS +NTAPI +ObpSetHandleAttributes( + HANDLE Handle, + POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo +); + +NTSTATUS STDCALL -ObpCreateTypeObject(struct _OBJECT_TYPE_INITIALIZER *ObjectTypeInitializer, - PUNICODE_STRING TypeName, - POBJECT_TYPE *ObjectType); +ObpCreateTypeObject( + struct _OBJECT_TYPE_INITIALIZER *ObjectTypeInitializer, + PUNICODE_STRING TypeName, + POBJECT_TYPE *ObjectType +); ULONG +NTAPI ObGetObjectHandleCount(PVOID Object); + NTSTATUS -ObDuplicateObject(PEPROCESS SourceProcess, - PEPROCESS TargetProcess, - HANDLE SourceHandle, - PHANDLE TargetHandle, - ACCESS_MASK DesiredAccess, - BOOLEAN InheritHandle, - ULONG Options); +NTAPI +ObDuplicateObject( + PEPROCESS SourceProcess, + PEPROCESS TargetProcess, + HANDLE SourceHandle, + PHANDLE TargetHandle, + ACCESS_MASK DesiredAccess, + BOOLEAN InheritHandle, + ULONG Options +); ULONG +NTAPI ObpGetHandleCountByHandleTable(PHANDLE_TABLE HandleTable); VOID STDCALL -ObQueryDeviceMapInformation(PEPROCESS Process, PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo); +ObQueryDeviceMapInformation( + PEPROCESS Process, + PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo +); -VOID FASTCALL -ObpSetPermanentObject (IN PVOID ObjectBody, IN BOOLEAN Permanent); +VOID +FASTCALL +ObpSetPermanentObject( + IN PVOID ObjectBody, + IN BOOLEAN Permanent +); VOID STDCALL ObKillProcess(PEPROCESS Process); + /* Security descriptor cache functions */ NTSTATUS +NTAPI ObpInitSdCache(VOID); NTSTATUS -ObpAddSecurityDescriptor(IN PSECURITY_DESCRIPTOR SourceSD, - OUT PSECURITY_DESCRIPTOR *DestinationSD); +NTAPI +ObpAddSecurityDescriptor( + IN PSECURITY_DESCRIPTOR SourceSD, + OUT PSECURITY_DESCRIPTOR *DestinationSD +); NTSTATUS +NTAPI ObpRemoveSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor); VOID +NTAPI ObpReferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor); VOID +NTAPI ObpDereferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor); VOID FASTCALL -ObInitializeFastReference(IN PEX_FAST_REF FastRef, - PVOID Object); +ObInitializeFastReference( + IN PEX_FAST_REF FastRef, + PVOID Object +); PVOID FASTCALL -ObFastReplaceObject(IN PEX_FAST_REF FastRef, - PVOID Object); +ObFastReplaceObject( + IN PEX_FAST_REF FastRef, + PVOID Object +); PVOID FASTCALL @@ -168,32 +220,30 @@ VOID FASTCALL -ObFastDereferenceObject(IN PEX_FAST_REF FastRef, - PVOID Object); +ObFastDereferenceObject( + IN PEX_FAST_REF FastRef, + PVOID Object +); /* Secure object information functions */ -typedef struct _CAPTURED_OBJECT_ATTRIBUTES -{ - HANDLE RootDirectory; - ULONG Attributes; - PSECURITY_DESCRIPTOR SecurityDescriptor; - PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService; -} CAPTURED_OBJECT_ATTRIBUTES, *PCAPTURED_OBJECT_ATTRIBUTES; - NTSTATUS STDCALL -ObpCaptureObjectName(IN PUNICODE_STRING CapturedName, - IN PUNICODE_STRING ObjectName, - IN KPROCESSOR_MODE AccessMode); - +ObpCaptureObjectName( + IN PUNICODE_STRING CapturedName, + IN PUNICODE_STRING ObjectName, + IN KPROCESSOR_MODE AccessMode +); + NTSTATUS STDCALL -ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes, - IN KPROCESSOR_MODE AccessMode, - IN POBJECT_TYPE ObjectType, - IN POBJECT_CREATE_INFORMATION ObjectCreateInfo, - OUT PUNICODE_STRING ObjectName); +ObpCaptureObjectAttributes( + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN KPROCESSOR_MODE AccessMode, + IN POBJECT_TYPE ObjectType, + IN POBJECT_CREATE_INFORMATION ObjectCreateInfo, + OUT PUNICODE_STRING ObjectName +); VOID STDCALL @@ -201,21 +251,6 @@ /* object information classes */ -#define ICIF_QUERY 0x1 -#define ICIF_SET 0x2 -#define ICIF_QUERY_SIZE_VARIABLE 0x4 -#define ICIF_SET_SIZE_VARIABLE 0x8 -#define ICIF_SIZE_VARIABLE (ICIF_QUERY_SIZE_VARIABLE | ICIF_SET_SIZE_VARIABLE) - -typedef struct _INFORMATION_CLASS_INFO -{ - ULONG RequiredSizeQUERY; - ULONG RequiredSizeSET; - ULONG AlignmentSET; - ULONG AlignmentQUERY; - ULONG Flags; -} INFORMATION_CLASS_INFO, *PINFORMATION_CLASS_INFO; - #define ICI_SQ_SAME(Size, Alignment, Flags) \ { Size, Size, Alignment, Alignment, Flags } _____ Modified: trunk/reactos/ntoskrnl/include/internal/po.h --- trunk/reactos/ntoskrnl/include/internal/po.h 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/include/internal/po.h 2005-09-13 23:48:54 UTC (rev 17845) @@ -4,12 +4,14 @@ extern PDEVICE_NODE PopSystemPowerDeviceNode; VOID +NTAPI PoInit( PLOADER_PARAMETER_BLOCK LoaderBlock, BOOLEAN ForceAcpiDisable ); NTSTATUS +NTAPI PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState); #endif /* __NTOSKRNL_INCLUDE_INTERNAL_PO_H */ _____ Modified: trunk/reactos/ntoskrnl/include/internal/port.h --- trunk/reactos/ntoskrnl/include/internal/port.h 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/include/internal/port.h 2005-09-13 23:48:54 UTC (rev 17845) @@ -1,148 +1,160 @@ #ifndef __INCLUDE_INTERNAL_PORT_H #define __INCLUDE_INTERNAL_PORT_H +/* EPORT.Type */ + +#define EPORT_TYPE_SERVER_RQST_PORT (0) +#define EPORT_TYPE_SERVER_COMM_PORT (1) +#define EPORT_TYPE_CLIENT_COMM_PORT (2) + +/* EPORT.State */ + +#define EPORT_INACTIVE (0) +#define EPORT_WAIT_FOR_CONNECT (1) +#define EPORT_WAIT_FOR_ACCEPT (2) +#define EPORT_WAIT_FOR_COMPLETE_SRV (3) +#define EPORT_WAIT_FOR_COMPLETE_CLT (4) +#define EPORT_CONNECTED_CLIENT (5) +#define EPORT_CONNECTED_SERVER (6) +#define EPORT_DISCONNECTED (7) + +extern POBJECT_TYPE LpcPortObjectType; +extern ULONG LpcpNextMessageId; +extern FAST_MUTEX LpcpLock; + typedef struct _EPORT_LISTENER { - HANDLE ListenerPid; - LIST_ENTRY ListenerListEntry; + HANDLE ListenerPid; + LIST_ENTRY ListenerListEntry; } EPORT_LISTENER, *PEPORT_LISTENER; typedef struct _EPORT { - KSPIN_LOCK Lock; - KSEMAPHORE Semaphore; + KSPIN_LOCK Lock; + KSEMAPHORE Semaphore; + USHORT Type; + USHORT State; + struct _EPORT *RequestPort; + struct _EPORT *OtherPort; + ULONG QueueLength; + LIST_ENTRY QueueListHead; + ULONG ConnectQueueLength; + LIST_ENTRY ConnectQueueListHead; + ULONG MaxDataLength; + ULONG MaxConnectInfoLength; + ULONG MaxPoolUsage; /* size of NP zone */ +} EPORT, *PEPORT; - USHORT Type; - USHORT State; - - struct _EPORT * RequestPort; - struct _EPORT * OtherPort; - - ULONG QueueLength; - LIST_ENTRY QueueListHead; - - ULONG ConnectQueueLength; - LIST_ENTRY ConnectQueueListHead; - - ULONG MaxDataLength; - ULONG MaxConnectInfoLength; - ULONG MaxPoolUsage; /* size of NP zone */ -} EPORT, * PEPORT; - typedef struct _EPORT_CONNECT_REQUEST_MESSAGE { - PORT_MESSAGE MessageHeader; - PEPROCESS ConnectingProcess; - struct _SECTION_OBJECT* SendSectionObject; - LARGE_INTEGER SendSectionOffset; - ULONG SendViewSize; - ULONG ConnectDataLength; - UCHAR ConnectData[0]; + PORT_MESSAGE MessageHeader; + PEPROCESS ConnectingProcess; + struct _SECTION_OBJECT* SendSectionObject; + LARGE_INTEGER SendSectionOffset; + ULONG SendViewSize; + ULONG ConnectDataLength; + UCHAR ConnectData[0]; } EPORT_CONNECT_REQUEST_MESSAGE, *PEPORT_CONNECT_REQUEST_MESSAGE; typedef struct _EPORT_CONNECT_REPLY_MESSAGE { - PORT_MESSAGE MessageHeader; - PVOID SendServerViewBase; - ULONG ReceiveClientViewSize; - PVOID ReceiveClientViewBase; - ULONG MaximumMessageSize; - ULONG ConnectDataLength; - UCHAR ConnectData[0]; + PORT_MESSAGE MessageHeader; + PVOID SendServerViewBase; + ULONG ReceiveClientViewSize; + PVOID ReceiveClientViewBase; + ULONG MaximumMessageSize; + ULONG ConnectDataLength; + UCHAR ConnectData[0]; } EPORT_CONNECT_REPLY_MESSAGE, *PEPORT_CONNECT_REPLY_MESSAGE; -typedef struct _TERMINATION_PORT { - struct _TERMINATION_PORT *Next; - PVOID Port; -} TERMINATION_PORT, *PTERMINATION_PORT; +typedef struct _QUEUEDMESSAGE +{ + PEPORT Sender; + LIST_ENTRY QueueListEntry; + PORT_MESSAGE Message; +} QUEUEDMESSAGE, *PQUEUEDMESSAGE; -NTSTATUS STDCALL -LpcRequestPort (PEPORT Port, - PPORT_MESSAGE LpcMessage); NTSTATUS STDCALL -LpcSendTerminationPort (PEPORT Port, - LARGE_INTEGER CreationTime); +LpcRequestPort( + PEPORT Port, + PPORT_MESSAGE LpcMessage +); -/* EPORT.Type */ +NTSTATUS +STDCALL +LpcSendTerminationPort( + PEPORT Port, + LARGE_INTEGER CreationTime +); -#define EPORT_TYPE_SERVER_RQST_PORT (0) -#define EPORT_TYPE_SERVER_COMM_PORT (1) -#define EPORT_TYPE_CLIENT_COMM_PORT (2) +/* Code in ntoskrnl/lpc/close.h */ -/* EPORT.State */ +VOID +STDCALL +LpcpClosePort( + PVOID ObjectBody, + ULONG HandleCount +); -#define EPORT_INACTIVE (0) -#define EPORT_WAIT_FOR_CONNECT (1) -#define EPORT_WAIT_FOR_ACCEPT (2) -#define EPORT_WAIT_FOR_COMPLETE_SRV (3) -#define EPORT_WAIT_FOR_COMPLETE_CLT (4) -#define EPORT_CONNECTED_CLIENT (5) -#define EPORT_CONNECTED_SERVER (6) -#define EPORT_DISCONNECTED (7) +VOID +STDCALL +LpcpDeletePort(IN PVOID ObjectBody); -/* Pool Tags */ +/* Code in ntoskrnl/lpc/queue.c */ -typedef struct _QUEUEDMESSAGE -{ - PEPORT Sender; - LIST_ENTRY QueueListEntry; - PORT_MESSAGE Message; -} QUEUEDMESSAGE, *PQUEUEDMESSAGE; +VOID +STDCALL +EiEnqueueConnectMessagePort( + IN OUT PEPORT Port, + IN PQUEUEDMESSAGE Message +); -/* Code in ntoskrnl/lpc/close.h */ +VOID +STDCALL +EiEnqueueMessagePort( + IN OUT PEPORT Port, + IN PQUEUEDMESSAGE Message +); -VOID STDCALL -LpcpClosePort (PVOID ObjectBody, - ULONG HandleCount); -VOID STDCALL -LpcpDeletePort (IN PVOID ObjectBody); +VOID +STDCALL +EiEnqueueMessageAtHeadPort( + IN OUT PEPORT Port, + IN PQUEUEDMESSAGE Message +); -/* Code in ntoskrnl/lpc/queue.c */ +PQUEUEDMESSAGE +STDCALL +EiDequeueConnectMessagePort(IN OUT PEPORT Port); -VOID STDCALL -EiEnqueueConnectMessagePort (IN OUT PEPORT Port, - IN PQUEUEDMESSAGE Message); -VOID STDCALL -EiEnqueueMessagePort (IN OUT PEPORT Port, - IN PQUEUEDMESSAGE Message); -VOID STDCALL -EiEnqueueMessageAtHeadPort (IN OUT PEPORT Port, - IN PQUEUEDMESSAGE Message); PQUEUEDMESSAGE STDCALL -EiDequeueConnectMessagePort (IN OUT PEPORT Port); -PQUEUEDMESSAGE STDCALL -EiDequeueMessagePort (IN OUT PEPORT Port); +EiDequeueMessagePort(IN OUT PEPORT Port); -/* Code in ntoskrnl/lpc/create.c */ - -NTSTATUS STDCALL -NiCreatePort (PVOID ObjectBody, - PVOID Parent, - PWSTR RemainingPath, - POBJECT_ATTRIBUTES ObjectAttributes); - /* Code in ntoskrnl/lpc/port.c */ -NTSTATUS STDCALL -LpcpInitializePort (IN OUT PEPORT Port, - IN USHORT Type, - IN PEPORT Parent OPTIONAL); NTSTATUS +STDCALL +LpcpInitializePort( + IN OUT PEPORT Port, + IN USHORT Type, + IN PEPORT Parent OPTIONAL +); + +NTSTATUS +NTAPI LpcpInitSystem (VOID); -extern POBJECT_TYPE LpcPortObjectType; -extern ULONG LpcpNextMessageId; -extern FAST_MUTEX LpcpLock; - /* Code in ntoskrnl/lpc/reply.c */ -NTSTATUS STDCALL -EiReplyOrRequestPort (IN PEPORT Port, - IN PPORT_MESSAGE LpcReply, - IN ULONG MessageType, - IN PEPORT Sender); +NTSTATUS +STDCALL +EiReplyOrRequestPort( + IN PEPORT Port, + IN PPORT_MESSAGE LpcReply, + IN ULONG MessageType, + IN PEPORT Sender +); - #endif /* __INCLUDE_INTERNAL_PORT_H */ _____ Modified: trunk/reactos/ntoskrnl/lpc/port.c --- trunk/reactos/ntoskrnl/lpc/port.c 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/lpc/port.c 2005-09-13 23:48:54 UTC (rev 17845) @@ -32,7 +32,9 @@ /* FUNCTIONS *****************************************************************/ -NTSTATUS INIT_FUNCTION +NTSTATUS +INIT_FUNCTION +NTAPI LpcpInitSystem (VOID) { OBJECT_TYPE_INITIALIZER ObjectTypeInitializer; _____ Modified: trunk/reactos/ntoskrnl/ob/handle.c --- trunk/reactos/ntoskrnl/ob/handle.c 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/ob/handle.c 2005-09-13 23:48:54 UTC (rev 17845) @@ -85,6 +85,7 @@ NTSTATUS +NTAPI ObpQueryHandleAttributes(HANDLE Handle, POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo) { @@ -128,6 +129,7 @@ NTSTATUS +NTAPI ObpSetHandleAttributes(HANDLE Handle, POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo) { @@ -227,6 +229,7 @@ NTSTATUS +NTAPI ObDuplicateObject(PEPROCESS SourceProcess, PEPROCESS TargetProcess, HANDLE SourceHandle, @@ -540,7 +543,9 @@ return Ret; } -VOID ObCreateHandleTable(PEPROCESS Parent, +VOID +NTAPI +ObCreateHandleTable(PEPROCESS Parent, BOOLEAN Inherit, PEPROCESS Process) /* @@ -582,6 +587,7 @@ NTSTATUS +NTAPI ObpCreateHandle(PEPROCESS Process, PVOID ObjectBody, ACCESS_MASK GrantedAccess, @@ -1139,6 +1145,7 @@ ULONG +NTAPI ObpGetHandleCountByHandleTable(PHANDLE_TABLE HandleTable) { return HandleTable->HandleCount; _____ Modified: trunk/reactos/ntoskrnl/ob/namespc.c --- trunk/reactos/ntoskrnl/ob/namespc.c 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/ob/namespc.c 2005-09-13 23:48:54 UTC (rev 17845) @@ -239,6 +239,7 @@ } VOID +NTAPI ObpAddEntryDirectory(PDIRECTORY_OBJECT Parent, POBJECT_HEADER Header, PWSTR Name) @@ -262,6 +263,7 @@ VOID +NTAPI ObpRemoveEntryDirectory(POBJECT_HEADER Header) /* * FUNCTION: Remove an entry from a namespace directory _____ Modified: trunk/reactos/ntoskrnl/ob/object.c --- trunk/reactos/ntoskrnl/ob/object.c 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/ob/object.c 2005-09-13 23:48:54 UTC (rev 17845) @@ -288,6 +288,7 @@ * RETURN VALUE */ NTSTATUS +NTAPI ObFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo, PUNICODE_STRING ObjectName, PVOID* ReturnedObject, @@ -1247,6 +1248,7 @@ * Reference count. */ ULONG +NTAPI ObGetObjectHandleCount(PVOID Object) { POBJECT_HEADER Header; _____ Modified: trunk/reactos/ntoskrnl/ob/sdcache.c --- trunk/reactos/ntoskrnl/ob/sdcache.c 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/ob/sdcache.c 2005-09-13 23:48:54 UTC (rev 17845) @@ -36,6 +36,7 @@ /* FUNCTIONS ****************************************************************/ NTSTATUS +NTAPI ObpInitSdCache(VOID) { ULONG i; @@ -207,6 +208,7 @@ NTSTATUS +NTAPI ObpAddSecurityDescriptor(IN PSECURITY_DESCRIPTOR SourceSD, OUT PSECURITY_DESCRIPTOR *DestinationSD) { @@ -277,6 +279,7 @@ NTSTATUS +NTAPI ObpRemoveSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor) { PSD_CACHE_ENTRY CacheEntry; @@ -305,6 +308,7 @@ VOID +NTAPI ObpReferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor) { PSD_CACHE_ENTRY CacheEntry; @@ -325,6 +329,7 @@ VOID +NTAPI ObpDereferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor) { DPRINT("ObpDereferenceCachedSecurityDescriptor() called\n"); _____ Modified: trunk/reactos/ntoskrnl/ob/symlink.c --- trunk/reactos/ntoskrnl/ob/symlink.c 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/ob/symlink.c 2005-09-13 23:48:54 UTC (rev 17845) @@ -131,6 +131,7 @@ */ VOID INIT_FUNCTION +NTAPI ObInitSymbolicLinkImplementation (VOID) { UNICODE_STRING Name; _____ Modified: trunk/reactos/ntoskrnl/po/power.c --- trunk/reactos/ntoskrnl/po/power.c 2005-09-13 23:28:21 UTC (rev 17844) +++ trunk/reactos/ntoskrnl/po/power.c 2005-09-13 23:48:54 UTC (rev 17845) @@ -229,6 +229,7 @@ } NTSTATUS +NTAPI PopSetSystemPowerState( SYSTEM_POWER_STATE PowerState) { @@ -291,6 +292,7 @@ VOID INIT_FUNCTION +NTAPI PoInit(PLOADER_PARAMETER_BLOCK LoaderBlock, BOOLEAN ForceAcpiDisable) {
19 years, 1 month
1
0
0
0
[ion] 17844: Part 1 of <many> ntoskrnl header cleanups
by ion@svn.reactos.com
Part 1 of <many> ntoskrnl header cleanups Modified: trunk/reactos/include/ndk/ketypes.h Modified: trunk/reactos/include/ndk/pstypes.h Modified: trunk/reactos/ntoskrnl/include/internal/ex.h Modified: trunk/reactos/ntoskrnl/include/internal/ke.h Modified: trunk/reactos/ntoskrnl/include/internal/mm.h Modified: trunk/reactos/ntoskrnl/include/internal/ps.h Modified: trunk/reactos/ntoskrnl/include/internal/se.h Modified: trunk/reactos/ntoskrnl/include/internal/test.h Modified: trunk/reactos/ntoskrnl/include/internal/v86m.h Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c Modified: trunk/reactos/ntoskrnl/ke/process.c Modified: trunk/reactos/ntoskrnl/ke/usercall.c Modified: trunk/reactos/ntoskrnl/ps/idle.c Modified: trunk/reactos/ntoskrnl/ps/job.c Modified: trunk/reactos/ntoskrnl/ps/locale.c Modified: trunk/reactos/ntoskrnl/ps/process.c Modified: trunk/reactos/ntoskrnl/ps/psmgr.c Modified: trunk/reactos/ntoskrnl/ps/win32.c Modified: trunk/reactos/ntoskrnl/se/acl.c Modified: trunk/reactos/ntoskrnl/se/luid.c Modified: trunk/reactos/ntoskrnl/se/priv.c Modified: trunk/reactos/ntoskrnl/se/sd.c Modified: trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/se/sid.c Modified: trunk/reactos/ntoskrnl/se/token.c _____ Modified: trunk/reactos/include/ndk/ketypes.h --- trunk/reactos/include/ndk/ketypes.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/include/ndk/ketypes.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -147,6 +147,13 @@ DeferredReady, } KTHREAD_STATE, *PKTHREAD_STATE; +typedef enum _KPROCESS_STATE +{ + ProcessInMemory, + ProcessOutOfMemory, + ProcessInTransition, +} KPROCESS_STATE, *PKPROCESS_STATE; + /* FUNCTION TYPES ************************************************************/ #ifdef NTOS_MODE_USER _____ Modified: trunk/reactos/include/ndk/pstypes.h --- trunk/reactos/include/ndk/pstypes.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/include/ndk/pstypes.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -56,6 +56,11 @@ #define PROCESS_PRIORITY_CLASS_BELOW_NORMAL 5 #define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL 6 +/* Process base priorities */ +#define PROCESS_PRIORITY_IDLE 3 +#define PROCESS_PRIORITY_NORMAL 8 +#define PROCESS_PRIORITY_NORMAL_FOREGROUND 9 + /* Global Flags */ #define FLG_STOP_ON_EXCEPTION 0x00000001 #define FLG_SHOW_LDR_SNAPS 0x00000002 _____ Modified: trunk/reactos/ntoskrnl/include/internal/ex.h --- trunk/reactos/ntoskrnl/include/internal/ex.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/ntoskrnl/include/internal/ex.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -200,6 +200,7 @@ ExpSetTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation); NTSTATUS +NTAPI ExpAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId); VOID _____ Modified: trunk/reactos/ntoskrnl/include/internal/ke.h --- trunk/reactos/ntoskrnl/include/internal/ke.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/ntoskrnl/include/internal/ke.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -416,6 +416,75 @@ VOID KiSetSystemTime(PLARGE_INTEGER NewSystemTime); +/* Emulate cli/sti instructions */ +#define KV86M_EMULATE_CLI_STI (0x1) +/* Allow the v86 mode code to access i/o ports */ +#define KV86M_ALLOW_IO_PORT_ACCESS (0x2) + +typedef struct _KV86M_REGISTERS +{ + /* + * General purpose registers + */ + ULONG Ebp; + ULONG Edi; + ULONG Esi; + ULONG Edx; + ULONG Ecx; + ULONG Ebx; + ULONG Eax; + ULONG Ds; + ULONG Es; + ULONG Fs; + ULONG Gs; + + /* + * Control registers + */ + ULONG Eip; + ULONG Cs; + ULONG Eflags; + ULONG Esp; + ULONG Ss; + + /* + * Control structures + */ + ULONG RecoveryAddress; + UCHAR RecoveryInstruction[4]; + ULONG Vif; + ULONG Flags; + PNTSTATUS PStatus; +} KV86M_REGISTERS, *PKV86M_REGISTERS; + +typedef struct _KV86M_TRAP_FRAME +{ + KTRAP_FRAME Tf; + + ULONG SavedExceptionStack; + + /* + * These are put on the top of the stack by the routine that entered + * v86 mode so the exception handlers can find the control information + */ + struct _KV86M_REGISTERS* regs; + ULONG orig_ebp; +} KV86M_TRAP_FRAME, *PKV86M_TRAP_FRAME; + +NTSTATUS +STDCALL +Ke386CallBios( + UCHAR Int, + PKV86M_REGISTERS Regs +); + +ULONG +KeV86Exception( + ULONG ExceptionNr, + PKTRAP_FRAME Tf, + ULONG address +); + #define MAXIMUM_PROCESSORS 32 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_KE_H */ _____ Modified: trunk/reactos/ntoskrnl/include/internal/mm.h --- trunk/reactos/ntoskrnl/include/internal/mm.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/ntoskrnl/include/internal/mm.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -888,4 +888,13 @@ VOID MiStopPagerThread(VOID); + +NTSTATUS FASTCALL +MiQueryVirtualMemory (IN HANDLE ProcessHandle, + IN PVOID Address, + IN CINT VirtualMemoryInformationClass, + OUT PVOID VirtualMemoryInformation, + IN ULONG Length, + OUT PULONG ResultLength); + #endif _____ Modified: trunk/reactos/ntoskrnl/include/internal/ps.h --- trunk/reactos/ntoskrnl/include/internal/ps.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/ntoskrnl/include/internal/ps.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -10,97 +10,206 @@ extern LCID PsDefaultThreadLocaleId; extern LCID PsDefaultSystemLocaleId; +extern LIST_ENTRY PspReaperListHead; +extern WORK_QUEUE_ITEM PspReaperWorkItem; +extern BOOLEAN PspReaping; +extern PEPROCESS PsInitialSystemProcess; +extern PEPROCESS PsIdleProcess; +extern LIST_ENTRY PsActiveProcessHead; +extern FAST_MUTEX PspActiveProcessMutex; +extern LARGE_INTEGER ShortPsLockDelay, PsLockTimeout; +extern EPROCESS_QUOTA_BLOCK PspDefaultQuotaBlock; /* Top level irp definitions. */ -#define FSRTL_FSP_TOP_LEVEL_IRP (0x01) -#define FSRTL_CACHE_TOP_LEVEL_IRP (0x02) -#define FSRTL_MOD_WRITE_TOP_LEVEL_IRP (0x03) -#define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04) -#define FSRTL_MAX_TOP_LEVEL_IRP_FLAG (0x04) +#define FSRTL_FSP_TOP_LEVEL_IRP (0x01) +#define FSRTL_CACHE_TOP_LEVEL_IRP (0x02) +#define FSRTL_MOD_WRITE_TOP_LEVEL_IRP (0x03) +#define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04) +#define FSRTL_MAX_TOP_LEVEL_IRP_FLAG (0x04) -#define PROCESS_STATE_TERMINATED (1) -#define PROCESS_STATE_ACTIVE (2) +#define MAX_PROCESS_NOTIFY_ROUTINE_COUNT 8 +#define MAX_LOAD_IMAGE_NOTIFY_ROUTINE_COUNT 8 -VOID PiInitDefaultLocale(VOID); -VOID PiInitProcessManager(VOID); -VOID PiShutdownProcessManager(VOID); -VOID PsInitThreadManagment(VOID); -VOID PsInitProcessManagment(VOID); -VOID PsInitIdleThread(VOID); -VOID PiTerminateProcessThreads(PEPROCESS Process, NTSTATUS ExitStatus); -VOID PsTerminateCurrentThread(NTSTATUS ExitStatus); -VOID PsTerminateOtherThread(PETHREAD Thread, NTSTATUS ExitStatus); -VOID PsReleaseThread(PETHREAD Thread); -VOID PsBeginThread(PKSTART_ROUTINE StartRoutine, PVOID StartContext); -VOID PsBeginThreadWithContextInternal(VOID); -VOID PiKillMostProcesses(VOID); -NTSTATUS STDCALL PiTerminateProcess(PEPROCESS Process, NTSTATUS ExitStatus); -VOID PiInitApcManagement(VOID); -VOID STDCALL PiDeleteThread(PVOID ObjectBody); -VOID PsReapThreads(VOID); -VOID PsInitializeThreadReaper(VOID); -VOID PsQueueThreadReap(PETHREAD Thread); +VOID +NTAPI +PiInitDefaultLocale(VOID); + +VOID +NTAPI +PiInitProcessManager(VOID); + +VOID +NTAPI +PiShutdownProcessManager(VOID); + +VOID +NTAPI +PsInitThreadManagment(VOID); + +VOID +NTAPI +PsInitProcessManagment(VOID); + +VOID +NTAPI +PsInitIdleThread(VOID); + +VOID +NTAPI +PiTerminateProcessThreads( + PEPROCESS Process, + NTSTATUS ExitStatus +); + +VOID +NTAPI +PsTerminateCurrentThread(NTSTATUS ExitStatus); + +VOID +NTAPI +PsTerminateOtherThread( + PETHREAD Thread, + NTSTATUS ExitStatus +); + +VOID +NTAPI +PsReleaseThread(PETHREAD Thread); + +VOID +NTAPI +PsBeginThread( + PKSTART_ROUTINE StartRoutine, + PVOID StartContext +); + +VOID +NTAPI +PsBeginThreadWithContextInternal(VOID); + +VOID +NTAPI +PiKillMostProcesses(VOID); + NTSTATUS -PsInitializeThread(PEPROCESS Process, - PETHREAD* ThreadPtr, - POBJECT_ATTRIBUTES ObjectAttributes, - KPROCESSOR_MODE AccessMode, - BOOLEAN First); +STDCALL +PiTerminateProcess( + PEPROCESS Process, + NTSTATUS ExitStatus +); -PACCESS_TOKEN STDCALL PsReferenceEffectiveToken(PETHREAD Thread, - PTOKEN_TYPE TokenType, - PUCHAR b, - PSECURITY_IMPERSONATION_LEVEL Level); +VOID +NTAPI +PiInitApcManagement(VOID); -NTSTATUS STDCALL PsOpenTokenOfProcess(HANDLE ProcessHandle, - PACCESS_TOKEN* Token); VOID STDCALL -PspTerminateProcessThreads(PEPROCESS Process, - NTSTATUS ExitStatus); -NTSTATUS PsSuspendThread(PETHREAD Thread, PULONG PreviousCount); -NTSTATUS PsResumeThread(PETHREAD Thread, PULONG PreviousCount); +PiDeleteThread(PVOID ObjectBody); + +VOID +NTAPI +PsReapThreads(VOID); + +VOID +NTAPI +PsInitializeThreadReaper(VOID); + +VOID +NTAPI +PsQueueThreadReap(PETHREAD Thread); + NTSTATUS +NTAPI +PsInitializeThread( + PEPROCESS Process, + PETHREAD* ThreadPtr, + POBJECT_ATTRIBUTES ObjectAttributes, + KPROCESSOR_MODE AccessMode, + BOOLEAN First +); + +PACCESS_TOKEN STDCALL -PspAssignPrimaryToken(PEPROCESS Process, - HANDLE TokenHandle); -VOID STDCALL PsExitSpecialApc(PKAPC Apc, - PKNORMAL_ROUTINE *NormalRoutine, - PVOID *NormalContext, - PVOID *SystemArgument1, - PVOID *SystemArgument2); +PsReferenceEffectiveToken( + PETHREAD Thread, + PTOKEN_TYPE TokenType, + PUCHAR b, + PSECURITY_IMPERSONATION_LEVEL Level +); NTSTATUS STDCALL -PspInitializeProcessSecurity(PEPROCESS Process, - PEPROCESS Parent OPTIONAL); +PsOpenTokenOfProcess( + HANDLE ProcessHandle, + PACCESS_TOKEN* Token +); +VOID +STDCALL +PspTerminateProcessThreads( + PEPROCESS Process, + NTSTATUS ExitStatus +); +NTSTATUS +NTAPI +PsSuspendThread( + PETHREAD Thread, + PULONG PreviousCount +); + +NTSTATUS +NTAPI +PsResumeThread( + PETHREAD Thread, + PULONG PreviousCount +); + +NTSTATUS +STDCALL +PspAssignPrimaryToken( + PEPROCESS Process, + HANDLE TokenHandle +); + VOID STDCALL -PspSystemThreadStartup(PKSTART_ROUTINE StartRoutine, - PVOID StartContext); +PsExitSpecialApc( + PKAPC Apc, + PKNORMAL_ROUTINE *NormalRoutine, + PVOID *NormalContext, + PVOID *SystemArgument1, + PVOID *SystemArgument2 +); NTSTATUS -PsInitializeIdleOrFirstThread ( +STDCALL +PspInitializeProcessSecurity( PEPROCESS Process, + PEPROCESS Parent OPTIONAL +); + +VOID +STDCALL +PspSystemThreadStartup( + PKSTART_ROUTINE StartRoutine, + PVOID StartContext +); + +NTSTATUS +NTAPI +PsInitializeIdleOrFirstThread( + PEPROCESS Process, PETHREAD* ThreadPtr, PKSTART_ROUTINE StartRoutine, KPROCESSOR_MODE AccessMode, - BOOLEAN First); -/* - * Internal thread priorities, added by Phillip Susi - * TODO: rebalence these to make use of all priorities... the ones above 16 - * can not all be used right now - */ -#define PROCESS_PRIO_IDLE 3 -#define PROCESS_PRIO_NORMAL 8 -#define PROCESS_PRIO_HIGH 13 -#define PROCESS_PRIO_RT 18 + BOOLEAN First +); +VOID +STDCALL +PiDeleteProcess(PVOID ObjectBody); -VOID STDCALL PiDeleteProcess(PVOID ObjectBody); - VOID STDCALL PspReapRoutine(PVOID Context); @@ -109,48 +218,75 @@ STDCALL PspExitThread(NTSTATUS ExitStatus); -extern LIST_ENTRY PspReaperListHead; -extern WORK_QUEUE_ITEM PspReaperWorkItem; -extern BOOLEAN PspReaping; -extern PEPROCESS PsInitialSystemProcess; -extern PEPROCESS PsIdleProcess; -extern LIST_ENTRY PsActiveProcessHead; -extern FAST_MUTEX PspActiveProcessMutex; -extern LARGE_INTEGER ShortPsLockDelay, PsLockTimeout; -extern EPROCESS_QUOTA_BLOCK PspDefaultQuotaBlock; +VOID +STDCALL +PspTerminateThreadByPointer( + PETHREAD Thread, + NTSTATUS ExitStatus +); VOID +NTAPI +PsUnfreezeOtherThread(PETHREAD Thread); + +VOID +NTAPI +PsFreezeOtherThread(PETHREAD Thread); + +VOID +NTAPI +PsFreezeProcessThreads(PEPROCESS Process); + +VOID +NTAPI +PsUnfreezeProcessThreads(PEPROCESS Process); + +ULONG +NTAPI +PsEnumThreadsByProcess(PEPROCESS Process); + +PEPROCESS STDCALL -PspTerminateThreadByPointer(PETHREAD Thread, - NTSTATUS ExitStatus); +PsGetNextProcess(PEPROCESS OldProcess); -VOID PsUnfreezeOtherThread(PETHREAD Thread); -VOID PsFreezeOtherThread(PETHREAD Thread); -VOID PsFreezeProcessThreads(PEPROCESS Process); -VOID PsUnfreezeProcessThreads(PEPROCESS Process); -ULONG PsEnumThreadsByProcess(PEPROCESS Process); -PEPROCESS STDCALL PsGetNextProcess(PEPROCESS OldProcess); VOID +NTAPI PsApplicationProcessorInit(VOID); + VOID +NTAPI PsPrepareForApplicationProcessorInit(ULONG Id); -VOID STDCALL + +VOID +STDCALL PsIdleThreadMain(PVOID Context); -VOID STDCALL +VOID +STDCALL PiSuspendThreadRundownRoutine(PKAPC Apc); -VOID STDCALL -PiSuspendThreadKernelRoutine(PKAPC Apc, - PKNORMAL_ROUTINE* NormalRoutine, - PVOID* NormalContext, - PVOID* SystemArgument1, - PVOID* SystemArguemnt2); -VOID STDCALL -PiSuspendThreadNormalRoutine(PVOID NormalContext, - PVOID SystemArgument1, - PVOID SystemArgument2); + VOID +STDCALL +PiSuspendThreadKernelRoutine( + PKAPC Apc, + PKNORMAL_ROUTINE* NormalRoutine, + PVOID* NormalContext, + PVOID* SystemArgument1, + PVOID* SystemArguemnt2 +); + +VOID +STDCALL +PiSuspendThreadNormalRoutine( + PVOID NormalContext, + PVOID SystemArgument1, + PVOID SystemArgument2 +); + +VOID +NTAPI PsInitialiseSuspendImplementation(VOID); + NTSTATUS STDCALL PspExitProcess(PEPROCESS Process); @@ -163,37 +299,52 @@ STDCALL PspDeleteThread(PVOID ObjectBody); -extern LONG PiNrThreadsAwaitingReaping; NTSTATUS -PsInitWin32Thread (PETHREAD Thread); +NTAPI +PsInitWin32Thread(PETHREAD Thread); VOID -PsTerminateWin32Process (PEPROCESS Process); +NTAPI +PsTerminateWin32Process(PEPROCESS Process); VOID -PsTerminateWin32Thread (PETHREAD Thread); +NTAPI +PsTerminateWin32Thread(PETHREAD Thread); VOID +NTAPI PsInitialiseW32Call(VOID); VOID STDCALL -PspRunCreateThreadNotifyRoutines(PETHREAD, BOOLEAN); +PspRunCreateThreadNotifyRoutines( + PETHREAD, + BOOLEAN +); VOID STDCALL -PspRunCreateProcessNotifyRoutines(PEPROCESS, BOOLEAN); +PspRunCreateProcessNotifyRoutines( + PEPROCESS, + BOOLEAN +); VOID STDCALL PspRunLegoRoutine(IN PKTHREAD Thread); -VOID INIT_FUNCTION PsInitJobManagment(VOID); +VOID +NTAPI +INIT_FUNCTION +PsInitJobManagment(VOID); VOID STDCALL -PspInheritQuota(PEPROCESS Process, PEPROCESS ParentProcess); +PspInheritQuota( + PEPROCESS Process, + PEPROCESS ParentProcess +); VOID STDCALL @@ -214,17 +365,15 @@ STDCALL PspGetSystemDllEntryPoints(VOID); -/* CLIENT ID */ +NTSTATUS +NTAPI +PsLockProcess( + PEPROCESS Process, + BOOLEAN Timeout +); -NTSTATUS PsLockProcess(PEPROCESS Process, BOOLEAN Timeout); -VOID PsUnlockProcess(PEPROCESS Process); +VOID +NTAPI +PsUnlockProcess(PEPROCESS Process); -#define ETHREAD_TO_KTHREAD(pEThread) (&(pEThread)->Tcb) -#define KTHREAD_TO_ETHREAD(pKThread) (CONTAINING_RECORD((pKThread), ETHREAD, Tcb)) -#define EPROCESS_TO_KPROCESS(pEProcess) (&(pEProcess)->Pcb) -#define KPROCESS_TO_EPROCESS(pKProcess) (CONTAINING_RECORD((pKProcess), EPROCESS, Pcb)) - -#define MAX_PROCESS_NOTIFY_ROUTINE_COUNT 8 -#define MAX_LOAD_IMAGE_NOTIFY_ROUTINE_COUNT 8 - #endif /* __INCLUDE_INTERNAL_PS_H */ _____ Modified: trunk/reactos/ntoskrnl/include/internal/se.h --- trunk/reactos/ntoskrnl/include/internal/se.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/ntoskrnl/include/internal/se.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -83,114 +83,178 @@ extern PSECURITY_DESCRIPTOR SeSystemDefaultSd; extern PSECURITY_DESCRIPTOR SeUnrestrictedSd; - /* Functions */ +BOOLEAN +NTAPI +SeInit1(VOID); -BOOLEAN SeInit1(VOID); -BOOLEAN SeInit2(VOID); -BOOLEAN SeInitSRM(VOID); +BOOLEAN +NTAPI +SeInit2(VOID); -VOID SepInitLuid(VOID); -VOID SepInitPrivileges(VOID); -BOOLEAN SepInitSecurityIDs(VOID); -BOOLEAN SepInitDACLs(VOID); -BOOLEAN SepInitSDs(VOID); +BOOLEAN +NTAPI +SeInitSRM(VOID); -VOID SeDeassignPrimaryToken(struct _EPROCESS *Process); +VOID +NTAPI +SepInitLuid(VOID); -NTSTATUS STDCALL -SepCreateImpersonationTokenDacl(PTOKEN Token, - PTOKEN PrimaryToken, - PACL *Dacl); +VOID +NTAPI +SepInitPrivileges(VOID); -VOID SepInitializeTokenImplementation(VOID); +BOOLEAN +NTAPI +SepInitSecurityIDs(VOID); -PTOKEN STDCALL SepCreateSystemProcessToken(VOID); +BOOLEAN +NTAPI +SepInitDACLs(VOID); -NTSTATUS SeExchangePrimaryToken(struct _EPROCESS* Process, - PACCESS_TOKEN NewToken, - PACCESS_TOKEN* OldTokenP); +BOOLEAN +NTAPI +SepInitSDs(VOID); +VOID +NTAPI +SeDeassignPrimaryToken(struct _EPROCESS *Process); + NTSTATUS -SeCaptureLuidAndAttributesArray(PLUID_AND_ATTRIBUTES Src, - ULONG PrivilegeCount, - KPROCESSOR_MODE PreviousMode, - PLUID_AND_ATTRIBUTES AllocatedMem, - ULONG AllocatedLength, - POOL_TYPE PoolType, - ULONG d, - PLUID_AND_ATTRIBUTES* Dest, - PULONG Length); +STDCALL +SepCreateImpersonationTokenDacl( + PTOKEN Token, + PTOKEN PrimaryToken, + PACL *Dacl +); VOID -SeReleaseLuidAndAttributesArray(PLUID_AND_ATTRIBUTES Privilege, - KPROCESSOR_MODE PreviousMode, - ULONG a); +NTAPI +SepInitializeTokenImplementation(VOID); +PTOKEN +STDCALL +SepCreateSystemProcessToken(VOID); + +NTSTATUS +NTAPI +SeExchangePrimaryToken( + struct _EPROCESS* Process, + PACCESS_TOKEN NewToken, + PACCESS_TOKEN* OldTokenP +); + +NTSTATUS +NTAPI +SeCaptureLuidAndAttributesArray( + PLUID_AND_ATTRIBUTES Src, + ULONG PrivilegeCount, + KPROCESSOR_MODE PreviousMode, + PLUID_AND_ATTRIBUTES AllocatedMem, + ULONG AllocatedLength, + POOL_TYPE PoolType, + ULONG d, + PLUID_AND_ATTRIBUTES* Dest, + PULONG Length +); + +VOID +NTAPI +SeReleaseLuidAndAttributesArray( + PLUID_AND_ATTRIBUTES Privilege, + KPROCESSOR_MODE PreviousMode, + ULONG a +); + BOOLEAN -SepPrivilegeCheck(PTOKEN Token, - PLUID_AND_ATTRIBUTES Privileges, - ULONG PrivilegeCount, - ULONG PrivilegeControl, - KPROCESSOR_MODE PreviousMode); +NTAPI +SepPrivilegeCheck( + PTOKEN Token, + PLUID_AND_ATTRIBUTES Privileges, + ULONG PrivilegeCount, + ULONG PrivilegeControl, + KPROCESSOR_MODE PreviousMode +); NTSTATUS STDCALL -SepDuplicateToken(PTOKEN Token, - POBJECT_ATTRIBUTES ObjectAttributes, - BOOLEAN EffectiveOnly, - TOKEN_TYPE TokenType, - SECURITY_IMPERSONATION_LEVEL Level, - KPROCESSOR_MODE PreviousMode, - PTOKEN* NewAccessToken); +SepDuplicateToken( + PTOKEN Token, + POBJECT_ATTRIBUTES ObjectAttributes, + BOOLEAN EffectiveOnly, + TOKEN_TYPE TokenType, + SECURITY_IMPERSONATION_LEVEL Level, + KPROCESSOR_MODE PreviousMode, + PTOKEN* NewAccessToken +); NTSTATUS -SepCaptureSecurityQualityOfService(IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, - IN KPROCESSOR_MODE AccessMode, - IN POOL_TYPE PoolType, - IN BOOLEAN CaptureIfKernel, - OUT PSECURITY_QUALITY_OF_SERVICE *CapturedSecurityQualityOfService, - OUT PBOOLEAN Present); +NTAPI +SepCaptureSecurityQualityOfService( + IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, + IN KPROCESSOR_MODE AccessMode, + IN POOL_TYPE PoolType, + IN BOOLEAN CaptureIfKernel, + OUT PSECURITY_QUALITY_OF_SERVICE *CapturedSecurityQualityOfService, + OUT PBOOLEAN Present +); VOID -SepReleaseSecurityQualityOfService(IN PSECURITY_QUALITY_OF_SERVICE CapturedSecurityQualityOfService OPTIONAL, - IN KPROCESSOR_MODE AccessMode, - IN BOOLEAN CaptureIfKernel); +NTAPI +SepReleaseSecurityQualityOfService( + IN PSECURITY_QUALITY_OF_SERVICE CapturedSecurityQualityOfService OPTIONAL, + IN KPROCESSOR_MODE AccessMode, + IN BOOLEAN CaptureIfKernel +); NTSTATUS -SepCaptureSid(IN PSID InputSid, - IN KPROCESSOR_MODE AccessMode, - IN POOL_TYPE PoolType, - IN BOOLEAN CaptureIfKernel, - OUT PSID *CapturedSid); +NTAPI +SepCaptureSid( + IN PSID InputSid, + IN KPROCESSOR_MODE AccessMode, + IN POOL_TYPE PoolType, + IN BOOLEAN CaptureIfKernel, + OUT PSID *CapturedSid +); VOID -SepReleaseSid(IN PSID CapturedSid, - IN KPROCESSOR_MODE AccessMode, - IN BOOLEAN CaptureIfKernel); +NTAPI +SepReleaseSid( + IN PSID CapturedSid, + IN KPROCESSOR_MODE AccessMode, + IN BOOLEAN CaptureIfKernel +); NTSTATUS -SepCaptureAcl(IN PACL InputAcl, - IN KPROCESSOR_MODE AccessMode, - IN POOL_TYPE PoolType, - IN BOOLEAN CaptureIfKernel, - OUT PACL *CapturedAcl); +NTAPI +SepCaptureAcl( + IN PACL InputAcl, + IN KPROCESSOR_MODE AccessMode, + IN POOL_TYPE PoolType, + IN BOOLEAN CaptureIfKernel, + OUT PACL *CapturedAcl +); VOID -SepReleaseAcl(IN PACL CapturedAcl, - IN KPROCESSOR_MODE AccessMode, - IN BOOLEAN CaptureIfKernel); +NTAPI +SepReleaseAcl( + IN PACL CapturedAcl, + IN KPROCESSOR_MODE AccessMode, + IN BOOLEAN CaptureIfKernel +); NTSTATUS STDCALL -SeDefaultObjectMethod(PVOID Object, - SECURITY_OPERATION_CODE OperationType, - SECURITY_INFORMATION SecurityInformation, - PSECURITY_DESCRIPTOR NewSecurityDescriptor, - PULONG ReturnLength, - PSECURITY_DESCRIPTOR *OldSecurityDescriptor, - POOL_TYPE PoolType, - PGENERIC_MAPPING GenericMapping); +SeDefaultObjectMethod( + PVOID Object, + SECURITY_OPERATION_CODE OperationType, + SECURITY_INFORMATION SecurityInformation, + PSECURITY_DESCRIPTOR NewSecurityDescriptor, + PULONG ReturnLength, + PSECURITY_DESCRIPTOR *OldSecurityDescriptor, + POOL_TYPE PoolType, + PGENERIC_MAPPING GenericMapping +); #define SepAcquireTokenLockExclusive(Token) \ do { \ _____ Modified: trunk/reactos/ntoskrnl/include/internal/test.h --- trunk/reactos/ntoskrnl/include/internal/test.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/ntoskrnl/include/internal/test.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -1,48 +1,39 @@ #ifndef __NTOSKRNL_INCLUDE_INTERNAL_TEST_H #define __NTOSKRNL_INCLUDE_INTERNAL_TEST_H -typedef VOID STDCALL +typedef VOID +STDCALL PExFreePool(PVOID Block); -typedef PMDL STDCALL -PMmCreateMdl(PMDL Mdl, - PVOID Base, - ULONG Length); +typedef PMDL +STDCALL +PMmCreateMdl( + PMDL Mdl, + PVOID Base, + ULONG Length +); -typedef VOID STDCALL -PMmProbeAndLockPages(PMDL Mdl, - KPROCESSOR_MODE AccessMode, - LOCK_OPERATION Operation); +typedef VOID +STDCALL +PMmProbeAndLockPages( + PMDL Mdl, + KPROCESSOR_MODE AccessMode, + LOCK_OPERATION Operation +); -typedef VOID FASTCALL +typedef VOID +FASTCALL PObDereferenceObject(PVOID Object); -typedef NTSTATUS STDCALL -PObReferenceObjectByHandle(HANDLE Handle, - ACCESS_MASK DesiredAccess, - POBJECT_TYPE ObjectType, - KPROCESSOR_MODE AccessMode, - PVOID* Object, - POBJECT_HANDLE_INFORMATION HandleInformation); +typedef NTSTATUS +STDCALL +PObReferenceObjectByHandle( + HANDLE Handle, + ACCESS_MASK DesiredAccess, + POBJECT_TYPE ObjectType, + KPROCESSOR_MODE AccessMode, + PVOID* Object, + POBJECT_HANDLE_INFORMATION HandleInformation +); - -NTSTATUS STDCALL -MiLockVirtualMemory(HANDLE ProcessHandle, - PVOID BaseAddress, - ULONG NumberOfBytesToLock, - PULONG NumberOfBytesLocked, - PObReferenceObjectByHandle pObReferenceObjectByHandle, - PMmCreateMdl pMmCreateMdl, - PObDereferenceObject pObDereferenceObject, - PMmProbeAndLockPages pMmProbeAndLockPages, - PExFreePool pExFreePool); - -NTSTATUS FASTCALL -MiQueryVirtualMemory (IN HANDLE ProcessHandle, - IN PVOID Address, - IN CINT VirtualMemoryInformationClass, - OUT PVOID VirtualMemoryInformation, - IN ULONG Length, - OUT PULONG ResultLength); - #endif /* __NTOSKRNL_INCLUDE_INTERNAL_TEST_H */ _____ Modified: trunk/reactos/ntoskrnl/include/internal/v86m.h --- trunk/reactos/ntoskrnl/include/internal/v86m.h 2005-09-13 23:04:32 UTC (rev 17843) +++ trunk/reactos/ntoskrnl/include/internal/v86m.h 2005-09-13 23:28:21 UTC (rev 17844) @@ -10,73 +10,6 @@ #ifndef __NTOSKRNL_INCLUDE_INTERNAL_V86M_H #define __NTOSKRNL_INCLUDE_INTERNAL_V86M_H -/* Emulate cli/sti instructions */ -#define KV86M_EMULATE_CLI_STI (0x1) -/* Allow the v86 mode code to access i/o ports */ -#define KV86M_ALLOW_IO_PORT_ACCESS (0x2) -typedef struct _KV86M_REGISTERS -{ - /* - * General purpose registers - */ - ULONG Ebp; - ULONG Edi; - ULONG Esi; - ULONG Edx; - ULONG Ecx; - ULONG Ebx; - ULONG Eax; - ULONG Ds; - ULONG Es; - ULONG Fs; - ULONG Gs; - /* - * Control registers - */ - ULONG Eip; - ULONG Cs; - ULONG Eflags; - ULONG Esp; - ULONG Ss; - - /* - * Control structures - */ - ULONG RecoveryAddress; - UCHAR RecoveryInstruction[4]; - ULONG Vif; - ULONG Flags; - PNTSTATUS PStatus; [truncated at 1000 lines; 571 more skipped]
19 years, 1 month
1
0
0
0
[royce] 17843: zero out the struct and disable code that has no connection with reality - I'm thinking MIIM_STRING should be removed from flags also, but I have not tested with that change.
by royce@svn.reactos.com
zero out the struct and disable code that has no connection with reality - I'm thinking MIIM_STRING should be removed from flags also, but I have not tested with that change. Modified: trunk/reactos/lib/user32/windows/menu.c _____ Modified: trunk/reactos/lib/user32/windows/menu.c --- trunk/reactos/lib/user32/windows/menu.c 2005-09-13 20:26:57 UTC (rev 17842) +++ trunk/reactos/lib/user32/windows/menu.c 2005-09-13 23:04:32 UTC (rev 17843) @@ -4415,9 +4415,9 @@ LPCWSTR lpNewItem) { MENUITEMINFOW mii; + memset ( &mii, 0, sizeof(mii) ); mii.cbSize = sizeof(MENUITEMINFOW); mii.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE; - mii.fType = 0; mii.fState = MFS_ENABLED; UNIMPLEMENTED; @@ -4442,10 +4442,10 @@ } else { - if(mii.dwTypeData != NULL) + /*if(mii.dwTypeData != NULL) { HeapFree(GetProcessHeap(),0, mii.dwTypeData); - } + }*/ if (*lpNewItem == '\b') { mii.fType |= MF_HELP;
19 years, 1 month
1
0
0
0
[ion] 17842: Filip doesn't like int3. Implemented Trap6 failure on bad stack and V86M syscall return
by ion@svn.reactos.com
Filip doesn't like int3. Implemented Trap6 failure on bad stack and V86M syscall return Modified: trunk/reactos/ntoskrnl/ke/i386/syscall.S _____ Modified: trunk/reactos/ntoskrnl/ke/i386/syscall.S --- trunk/reactos/ntoskrnl/ke/i386/syscall.S 2005-09-13 20:13:05 UTC (rev 17841) +++ trunk/reactos/ntoskrnl/ke/i386/syscall.S 2005-09-13 20:26:57 UTC (rev 17842) @@ -93,13 +93,23 @@ BadStack: /* Restore ESP0 stack */ - int 3 mov ecx, [fs:KPCR_TSS] mov esp, ss:[ecx+KTSS_ESP0] - /* FIXME: Generate Trap 6*/ - int 3 + /* Generate V86M Stack for Trap 6 */ + push 0 + push 0 + push 0 + push 0 + /* Generate interrupt stack for Trap 6 */ + push USER_DS + push 0 + push 0x20202 + push USER_CS + push 0 + jmp _KiTrap6 + _KiFastCallEntry: // ==================== UNIQUE SYSENTER STUB. DO NOT DUPLICATE ============// @@ -417,6 +427,7 @@ jnz V86_Exit /* Check if the frame was edited */ +V86_Exit_Return: test word ptr [esp+KTRAP_FRAME_CS], FRAME_EDITED jz EditedFrame @@ -500,8 +511,17 @@ sti sysexit +V86_Exit: + /* Move to EDX position */ + add esp, KTRAP_FRAME_EDX + + /* Restore volatiles */ + pop edx + pop ecx + pop eax + jmp V86_Exit_Return + AbiosExit: -V86_Exit: /* Not yet supported */ int 3 @@ -636,9 +656,10 @@ /* Check for V86 */ test dword ptr [esp+KTRAP_FRAME_EFLAGS], X86_EFLAGS_VM - jnz V86_Exit + jnz V86_Exit2 /* Check if the frame was edited */ +V86_Exit_Return2: test word ptr [esp+KTRAP_FRAME_CS], FRAME_EDITED jz EditedFrame2 @@ -677,6 +698,16 @@ add esp, 4 iret +V86_Exit2: + /* Move to EDX position */ + add esp, KTRAP_FRAME_EDX + + /* Restore volatiles */ + pop edx + pop ecx + pop eax + jmp V86_Exit_Return + EditedFrame2: /* Restore real CS value */ mov ebx, [esp+KTRAP_FRAME_TEMPCS] @@ -838,9 +869,10 @@ /* Check for V86 */ test dword ptr [esp+KTRAP_FRAME_EFLAGS], X86_EFLAGS_VM - jnz V86_Exit + jnz V86_Exit3 /* Check if the frame was edited */ +V86_Exit_Return3: test word ptr [esp+KTRAP_FRAME_CS], FRAME_EDITED jz EditedFrame3 @@ -879,6 +911,16 @@ add esp, 4 iret +V86_Exit3: + /* Move to EDX position */ + add esp, KTRAP_FRAME_EDX + + /* Restore volatiles */ + pop edx + pop ecx + pop eax + jmp V86_Exit_Return + EditedFrame3: /* Restore real CS value */ mov ebx, [esp+KTRAP_FRAME_TEMPCS]
19 years, 1 month
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
59
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Results per page:
10
25
50
100
200