ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2009
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
28 participants
483 discussions
Start a n
N
ew thread
[dgorbachev] 39933: Silence compiler warning.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Tue Mar 10 15:41:23 2009 New Revision: 39933 URL:
http://svn.reactos.org/svn/reactos?rev=39933&view=rev
Log: Silence compiler warning. Modified: trunk/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c Modified: trunk/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c [iso-8859-1] Tue Mar 10 15:41:23 2009 @@ -114,6 +114,8 @@ Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice); SND_ASSERT( MMSUCCESS(Result) ); + if ( ! MMSUCCESS(Result) ) + return TranslateInternalMmResult(Result); PreviousInstance = NULL; CurrentInstance = SoundDevice->HeadInstance;
15 years, 10 months
1
0
0
0
[tkreuzer] 39932: Only warn when trying to free a NULL pointer with ExFreePoolWithTag
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 10 08:22:38 2009 New Revision: 39932 URL:
http://svn.reactos.org/svn/reactos?rev=39932&view=rev
Log: Only warn when trying to free a NULL pointer with ExFreePoolWithTag Modified: trunk/reactos/ntoskrnl/mm/pool.c Modified: trunk/reactos/ntoskrnl/mm/pool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pool.c?rev=399…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] Tue Mar 10 08:22:38 2009 @@ -296,6 +296,13 @@ } else { + /* Warn only for NULL pointers */ + if (Block == NULL) + { + DPRINT1("Warning: Trying to free a NULL pointer!\n"); + return; + } + /* Block was not inside any pool! */ KeBugCheckEx(BAD_POOL_CALLER, 0x42, (ULONG_PTR)Block, 0, 0); }
15 years, 10 months
1
0
0
0
[tkreuzer] 39931: Don't free a NULL pointer.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 10 07:34:33 2009 New Revision: 39931 URL:
http://svn.reactos.org/svn/reactos?rev=39931&view=rev
Log: Don't free a NULL pointer. Modified: trunk/reactos/subsystems/win32/win32k/objects/color.c Modified: trunk/reactos/subsystems/win32/win32k/objects/color.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/color.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/color.c [iso-8859-1] Tue Mar 10 07:34:33 2009 @@ -631,7 +631,8 @@ } memcpy(palGDI->IndexedColors + Start, pe, Entries * sizeof(PALETTEENTRY)); PALETTE_ValidateFlags(palGDI->IndexedColors, palGDI->NumColors); - ExFreePool(palGDI->logicalToSystem); + if (palGDI->logicalToSystem) + ExFreePool(palGDI->logicalToSystem); palGDI->logicalToSystem = NULL; PALETTE_UnlockPalette(palGDI);
15 years, 10 months
1
0
0
0
[tkreuzer] 39930: Initial code for freetype font driver
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 10 07:12:27 2009 New Revision: 39930 URL:
http://svn.reactos.org/svn/reactos?rev=39930&view=rev
Log: Initial code for freetype font driver Added: trunk/reactos/dll/3rdparty/freetype/ftfd/ (with props) trunk/reactos/dll/3rdparty/freetype/ftfd/enable.c (with props) trunk/reactos/dll/3rdparty/freetype/ftfd/font.c (with props) trunk/reactos/dll/3rdparty/freetype/ftfd/ftfd.h (with props) trunk/reactos/dll/3rdparty/freetype/ftfd/glyph.c (with props) Propchange: trunk/reactos/dll/3rdparty/freetype/ftfd/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Tue Mar 10 07:12:27 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/reactos/dll/3rdparty/freetype/ftfd/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/reactos/dll/3rdparty/freetype/ftfd/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/dll/3rdparty/freetype/ftfd/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/reactos/dll/3rdparty/freetype/ftfd/enable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/freetype/ftfd…
============================================================================== --- trunk/reactos/dll/3rdparty/freetype/ftfd/enable.c (added) +++ trunk/reactos/dll/3rdparty/freetype/ftfd/enable.c [iso-8859-1] Tue Mar 10 07:12:27 2009 @@ -1,0 +1,105 @@ +/* + * PROJECT: ReactOS win32 subsystem + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: GDI font driver for bitmap fonts + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +#include "ftfd.h" + +static DRVFN gadrvfn[] = +{ + {INDEX_DrvEnablePDEV, (PFN)FtfdEnablePDEV}, + {INDEX_DrvCompletePDEV, (PFN)FtfdCompletePDEV}, + {INDEX_DrvDisablePDEV, (PFN)FtfdDisablePDEV}, + {INDEX_DrvLoadFontFile, (PFN)FtfdLoadFontFile}, + {INDEX_DrvUnloadFontFile, (PFN)FtfdUnloadFontFile}, + {INDEX_DrvQueryFontFile, (PFN)FtfdQueryFontFile}, + {INDEX_DrvQueryFontCaps, (PFN)FtfdQueryFontCaps}, + {INDEX_DrvQueryFontTree, (PFN)FtfdQueryFontTree}, + {INDEX_DrvQueryFont, (PFN)FtfdQueryFont}, + {INDEX_DrvFree, (PFN)FtfdFree}, + {INDEX_DrvQueryGlyphAttrs, (PFN)FtfdQueryGlyphAttrs}, + {INDEX_DrvQueryFontData, (PFN)FtfdQueryFontData}, +}; + +FT_Library gftlibrary; + + +BOOL +APIENTRY +FtfdEnableDriver( + ULONG iEngineVersion, + ULONG cj, + PDRVENABLEDATA pded) +{ + FT_Error fterror; + + DbgPrint("FtfdEnableDriver()\n"); + + /* Check parameter */ + if (cj < sizeof(DRVENABLEDATA)) + { + return FALSE; + } + + /* Initialize freetype library */ + fterror = FT_Init_FreeType(&gftlibrary); + if (fterror) + { + DbgPrint("an error occurred during library initialization: %ld.\n", fterror); + return FALSE; + } + + /* Fill DRVENABLEDATA */ + pded->c = sizeof(gadrvfn) / sizeof(DRVFN); + pded->pdrvfn = gadrvfn; + pded->iDriverVersion = DDI_DRIVER_VERSION_NT5; + + /* Success */ + return TRUE; +} + + +DHPDEV +APIENTRY +FtfdEnablePDEV( + IN DEVMODEW *pdm, + IN LPWSTR pwszLogAddress, + IN ULONG cPat, + OUT HSURF *phsurfPatterns, + IN ULONG cjCaps, + OUT ULONG *pdevcaps, + IN ULONG cjDevInfo, + OUT DEVINFO *pdi, + IN HDEV hdev, + IN LPWSTR pwszDeviceName, + IN HANDLE hDriver) +{ + DbgPrint("FtfdEnablePDEV(hdev=%p)\n", hdev); + + + /* Return a dummy DHPDEV */ + return (PVOID)1; +} + + +VOID +APIENTRY +FtfdCompletePDEV( + IN DHPDEV dhpdev, + IN HDEV hdev) +{ + DbgPrint("FtfdCompletePDEV()\n"); + /* Nothing to do */ +} + + +VOID +APIENTRY +FtfdDisablePDEV( + IN DHPDEV dhpdev) +{ + DbgPrint("FtfdDisablePDEV()\n"); + /* Nothing to do */ +} Propchange: trunk/reactos/dll/3rdparty/freetype/ftfd/enable.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/3rdparty/freetype/ftfd/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/freetype/ftfd…
============================================================================== --- trunk/reactos/dll/3rdparty/freetype/ftfd/font.c (added) +++ trunk/reactos/dll/3rdparty/freetype/ftfd/font.c [iso-8859-1] Tue Mar 10 07:12:27 2009 @@ -1,0 +1,215 @@ +/* + * PROJECT: ReactOS win32 subsystem + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: GDI font driver for bitmap fonts + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +#include "ftfd.h" + +PVOID +HackFixup( + PVOID pvView, + ULONG cjView) +{ + CHAR *pc; + CHAR c; + + pc = EngAllocMem(0, cjView, 'tmp '); + memcpy(pc, pvView, cjView); + + c = *pc; + *pc = 0; + + return pc; +} + +/** Public Interface **********************************************************/ + +ULONG_PTR +APIENTRY +FtfdLoadFontFile( + ULONG cFiles, + ULONG_PTR *piFile, + PVOID *ppvView, + ULONG *pcjView, + DESIGNVECTOR *pdv, + ULONG ulLangID, + ULONG ulFastCheckSum) +{ + PVOID pvView; + ULONG cjView, i; + FT_Error fterror; + FT_Face ftface; + PFTFD_FILE pfile; + + DbgPrint("FtfdLoadFontFile()\n"); + + /* Check parameters */ + if (cFiles != 1) + { + DbgPrint("Only 1 File is allowed, got %ld!\n", cFiles); + return HFF_INVALID; + } + + /* Map the font file */ + if (!EngMapFontFileFD(*piFile, (PULONG*)&pvView, &cjView)) + { + DbgPrint("Could not map font file!\n", cFiles); + return HFF_INVALID; + } + + // HACK!!! + pvView = HackFixup(pvView, cjView); + + /* Look for faces in the file */ + for (i = 0; i < 100; i++) + { + fterror = FT_New_Memory_Face(gftlibrary, pvView, cjView, i, &ftface); + if (fterror) + { + DbgPrint("Error reading font file (error code: %u)\n", fterror); + break; + } + FT_Done_Face(ftface); + } + + /* Check whether we succeeded finding a face */ + if (i > 0) + { + pfile = EngAllocMem(0, sizeof(FTFD_FILE), 'dftF'); + if (pfile) + { + pfile->cNumFaces = i; + pfile->iFile = *piFile; + pfile->pvView = pvView; + pfile->cjView = cjView; + + DbgPrint("Success! Returning %ld faces\n", i); + + return (ULONG_PTR)pfile; + } + } + + DbgPrint("No faces found in file\n"); + + /* Unmap the file */ + EngUnmapFontFileFD(*piFile); + + /* Failure! */ + return HFF_INVALID; + +} + +BOOL +APIENTRY +FtfdUnloadFontFile( + IN ULONG_PTR iFile) +{ + PFTFD_FILE pfile = (PFTFD_FILE)iFile; + + DbgPrint("FtfdUnloadFontFile()\n"); + + // HACK!!! + EngFreeMem(pfile->pvView); + + /* Free the memory that was allocated for the font */ + EngFreeMem(pfile); + + /* Unmap the font file */ + EngUnmapFontFileFD(pfile->iFile); + + return TRUE; +} + + +LONG +APIENTRY +FtfdQueryFontFile( + ULONG_PTR iFile, + ULONG ulMode, + ULONG cjBuf, + ULONG *pulBuf) +{ + PFTFD_FILE pfile = (PFTFD_FILE)iFile; + + DbgPrint("FtfdQueryFontFile(ulMode=%ld)\n", ulMode); +// DbgBreakPoint(); + + switch (ulMode) + { + case QFF_DESCRIPTION: + { + return 0; + } + + case QFF_NUMFACES: + /* return the number of faces in the file */ + return pfile->cNumFaces; + + } + + return FD_ERROR; +} + +LONG +APIENTRY +FtfdQueryFontCaps( + ULONG culCaps, + ULONG *pulCaps) +{ + DbgPrint("BmfdQueryFontCaps()\n"); + + /* We need room for 2 ULONGs */ + if (culCaps < 2) + { + return FD_ERROR; + } + + /* We only support 1 bpp */ + pulCaps[0] = 2; + pulCaps[1] = QC_1BIT; + + return 2; +} + + +PVOID +APIENTRY +FtfdQueryFontTree( + DHPDEV dhpdev, + ULONG_PTR iFile, + ULONG iFace, + ULONG iMode, + ULONG_PTR *pid) +{ + return NULL; +} + +PIFIMETRICS +APIENTRY +FtfdQueryFont( + IN DHPDEV dhpdev, + IN ULONG_PTR iFile, + IN ULONG iFace, + IN ULONG_PTR *pid) +{ + return 0; +} + + +VOID +APIENTRY +FtfdFree( + PVOID pv, + ULONG_PTR id) +{ + DbgPrint("FtfdFree()\n"); + if (id) + { + EngFreeMem((PVOID)id); + } +} + + + Propchange: trunk/reactos/dll/3rdparty/freetype/ftfd/font.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/3rdparty/freetype/ftfd/ftfd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/freetype/ftfd…
============================================================================== --- trunk/reactos/dll/3rdparty/freetype/ftfd/ftfd.h (added) +++ trunk/reactos/dll/3rdparty/freetype/ftfd/ftfd.h [iso-8859-1] Tue Mar 10 07:12:27 2009 @@ -1,0 +1,136 @@ +/* + * PROJECT: ReactOS win32 subsystem + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: GDI font driver for bitmap fonts + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +#include <stdarg.h> +#include <windef.h> +#include <wingdi.h> +#include <winddi.h> + +#include <ft2build.h> +#include FT_FREETYPE_H + +extern FT_Library gftlibrary; + +/** Driver specific types *****************************************************/ + + +typedef struct +{ + PVOID pvView; + ULONG cjView; + ULONG_PTR iFile; + ULONG cNumFaces; +} FTFD_FILE, *PFTFD_FILE; + +/** Function prototypes *******************************************************/ + +ULONG +DbgPrint(IN PCHAR Format, IN ...); + +static __inline__ +void +DbgBreakPoint(void) +{ + asm volatile ("int $3"); +} + +DHPDEV +APIENTRY +FtfdEnablePDEV( + IN DEVMODEW *pdm, + IN LPWSTR pwszLogAddress, + IN ULONG cPat, + OUT HSURF *phsurfPatterns, + IN ULONG cjCaps, + OUT ULONG *pdevcaps, + IN ULONG cjDevInfo, + OUT DEVINFO *pdi, + IN HDEV hdev, + IN LPWSTR pwszDeviceName, + IN HANDLE hDriver); + +VOID +APIENTRY +FtfdCompletePDEV( + IN DHPDEV dhpdev, + IN HDEV hdev); + +VOID +APIENTRY +FtfdDisablePDEV( + IN DHPDEV dhpdev); + +ULONG_PTR +APIENTRY +FtfdLoadFontFile( + ULONG cFiles, + ULONG_PTR *piFile, + PVOID *ppvView, + ULONG *pcjView, + DESIGNVECTOR *pdv, + ULONG ulLangID, + ULONG ulFastCheckSum); + +BOOL +APIENTRY +FtfdUnloadFontFile( + IN ULONG_PTR iFile); + +LONG +APIENTRY +FtfdQueryFontFile( + ULONG_PTR iFile, + ULONG ulMode, + ULONG cjBuf, + ULONG *pulBuf); + +LONG +APIENTRY +FtfdQueryFontCaps( + ULONG culCaps, + ULONG *pulCaps); + +PVOID +APIENTRY +FtfdQueryFontTree( + DHPDEV dhpdev, + ULONG_PTR iFile, + ULONG iFace, + ULONG iMode, + ULONG_PTR *pid); + +PIFIMETRICS +APIENTRY +FtfdQueryFont( + IN DHPDEV dhpdev, + IN ULONG_PTR iFile, + IN ULONG iFace, + IN ULONG_PTR *pid); + +VOID +APIENTRY +FtfdFree( + PVOID pv, + ULONG_PTR id); + +PFD_GLYPHATTR +APIENTRY +FtfdQueryGlyphAttrs( + FONTOBJ *pfo, + ULONG iMode); + +LONG +APIENTRY +FtfdQueryFontData( + DHPDEV dhpdev, + FONTOBJ *pfo, + ULONG iMode, + HGLYPH hg, + OUT GLYPHDATA *pgd, + PVOID pv, + ULONG cjSize); + Propchange: trunk/reactos/dll/3rdparty/freetype/ftfd/ftfd.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/3rdparty/freetype/ftfd/glyph.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/freetype/ftfd…
============================================================================== --- trunk/reactos/dll/3rdparty/freetype/ftfd/glyph.c (added) +++ trunk/reactos/dll/3rdparty/freetype/ftfd/glyph.c [iso-8859-1] Tue Mar 10 07:12:27 2009 @@ -1,0 +1,34 @@ +/* + * PROJECT: ReactOS win32 subsystem + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: GDI font driver for bitmap fonts + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +#include "ftfd.h" + + +/** Public Interface **********************************************************/ + +PFD_GLYPHATTR +APIENTRY +FtfdQueryGlyphAttrs( + FONTOBJ *pfo, + ULONG iMode) +{ + return NULL; +} + +LONG +APIENTRY +FtfdQueryFontData( + DHPDEV dhpdev, + FONTOBJ *pfo, + ULONG iMode, + HGLYPH hg, + OUT GLYPHDATA *pgd, + PVOID pv, + ULONG cjSize) +{ + return FD_ERROR; +} Propchange: trunk/reactos/dll/3rdparty/freetype/ftfd/glyph.c ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 10 months
1
0
0
0
[tkreuzer] 39929: Add sprintf.c for as long as our libcntpr doesn't have it.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 10 06:45:44 2009 New Revision: 39929 URL:
http://svn.reactos.org/svn/reactos?rev=39929&view=rev
Log: Add sprintf.c for as long as our libcntpr doesn't have it. Added: trunk/reactos/dll/3rdparty/freetype/sprintf.c (with props) Modified: trunk/reactos/dll/3rdparty/freetype/freetype.rbuild Modified: trunk/reactos/dll/3rdparty/freetype/freetype.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/freetype/free…
============================================================================== --- trunk/reactos/dll/3rdparty/freetype/freetype.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/freetype/freetype.rbuild [iso-8859-1] Tue Mar 10 06:45:44 2009 @@ -105,5 +105,6 @@ </directory> </directory> <file>rosglue.c</file> + <file>sprintf.c</file> <file>freetype.rc</file> </module> Added: trunk/reactos/dll/3rdparty/freetype/sprintf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/freetype/spri…
============================================================================== --- trunk/reactos/dll/3rdparty/freetype/sprintf.c (added) +++ trunk/reactos/dll/3rdparty/freetype/sprintf.c [iso-8859-1] Tue Mar 10 06:45:44 2009 @@ -1,0 +1,742 @@ +/* + * PROGRAMMERS: David Welch + * Eric Kohl + * + * TODO: + * - Verify the implementation of '%Z'. + */ + +/* + * linux/lib/vsprintf.c + * + * Copyright (C) 1991, 1992 Linus Torvalds + */ + +/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ +/* + * Wirzenius wrote this portably, Torvalds fucked it up :-) + */ + +#define WIN32_NO_STATUS +#include <windows.h> +#include <ndk/ntndk.h> +#include <stdlib.h> +#include <stdio.h> + +#define ZEROPAD 1 /* pad with zero */ +#define SIGN 2 /* unsigned/signed long */ +#define PLUS 4 /* show plus */ +#define SPACE 8 /* space if plus */ +#define LEFT 16 /* left justified */ +#define SPECIAL 32 /* 0x */ +#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ +#define REMOVEHEX 256 /* use 256 as remve 0x frim BASE 16 */ +typedef struct { + unsigned int mantissal:32; + unsigned int mantissah:20; + unsigned int exponent:11; + unsigned int sign:1; +} double_t; + +static +__inline +int +_isinf(double __x) +{ + union + { + double* __x; + double_t* x; + } x; + + x.__x = &__x; + return ( x.x->exponent == 0x7ff && ( x.x->mantissah == 0 && x.x->mantissal == 0 )); +} + +static +__inline +int +_isnan(double __x) +{ + union + { + double* __x; + double_t* x; + } x; + x.__x = &__x; + return ( x.x->exponent == 0x7ff && ( x.x->mantissah != 0 || x.x->mantissal != 0 )); +} + + +static +__inline +int +do_div(long long *n, int base) +{ + int a; + a = ((unsigned long long) *n) % (unsigned) base; + *n = ((unsigned long long) *n) / (unsigned) base; + return a; +} + + +static int skip_atoi(const char **s) +{ + int i=0; + + while (isdigit(**s)) + i = i*10 + *((*s)++) - '0'; + return i; +} + + +static char * +number(char * buf, char * end, long long num, int base, int size, int precision, int type) +{ + char c,sign,tmp[66]; + const char *digits; + const char *small_digits = "0123456789abcdefghijklmnopqrstuvwxyz"; + const char *large_digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + int i; + + digits = (type & LARGE) ? large_digits : small_digits; + if (type & LEFT) + type &= ~ZEROPAD; + if (base < 2 || base > 36) + return 0; + c = (type & ZEROPAD) ? '0' : ' '; + sign = 0; + if (type & SIGN) { + if (num < 0) { + sign = '-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = '+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; + } + } + + if ((type & SPECIAL) && ((type & REMOVEHEX) == 0)) { + if (base == 16) + size -= 2; + + } + i = 0; + if ((num == 0) && (precision !=0)) + tmp[i++] = '0'; + else while (num != 0) + tmp[i++] = digits[do_div(&num,base)]; + if (i > precision) + precision = i; + size -= precision; + if (!(type&(ZEROPAD+LEFT))) { + while(size-->0) { + if (buf <= end) + *buf = ' '; + ++buf; + } + } + if (sign) { + if (buf <= end) + *buf = sign; + ++buf; + } + + if ((type & SPECIAL) && ((type & REMOVEHEX) == 0)) { + if (base==16) { + if (buf <= end) + *buf = '0'; + ++buf; + if (buf <= end) + *buf = digits[33]; + ++buf; + } + } + + if (!(type & LEFT)) { + while (size-- > 0) { + if (buf <= end) + *buf = c; + ++buf; + } + } + while (i < precision--) { + if (buf <= end) + *buf = '0'; + ++buf; + } + while (i-- > 0) { + if (buf <= end) + *buf = tmp[i]; + ++buf; + } + while (size-- > 0) { + if (buf <= end) + *buf = ' '; + ++buf; + } + + return buf; +} + +static char * +numberf(char * buf, char * end, double num, int base, int size, int precision, int type) +{ + char c,sign,tmp[66]; + const char *digits; + const char *small_digits = "0123456789abcdefghijklmnopqrstuvwxyz"; + const char *large_digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + int i; + long long x; + + /* FIXME + the float version of number is direcly copy of number + */ + + digits = (type & LARGE) ? large_digits : small_digits; + if (type & LEFT) + type &= ~ZEROPAD; + if (base < 2 || base > 36) + return 0; + c = (type & ZEROPAD) ? '0' : ' '; + sign = 0; + if (type & SIGN) { + if (num < 0) { + sign = '-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = '+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; + } + } + if (type & SPECIAL) { + if (base == 16) + size -= 2; + else if (base == 8) + size--; + } + i = 0; + if (num == 0) + tmp[i++] = '0'; + else while (num != 0) + { + x = num; + tmp[i++] = digits[do_div(&x,base)]; + num=x; + } + if (i > precision) + precision = i; + size -= precision; + if (!(type&(ZEROPAD+LEFT))) { + while(size-->0) { + if (buf <= end) + *buf = ' '; + ++buf; + } + } + if (sign) { + if (buf <= end) + *buf = sign; + ++buf; + } + if (type & SPECIAL) { + if (base==8) { + if (buf <= end) + *buf = '0'; + ++buf; + } else if (base==16) { + if (buf <= end) + *buf = '0'; + ++buf; + if (buf <= end) + *buf = digits[33]; + ++buf; + } + } + if (!(type & LEFT)) { + while (size-- > 0) { + if (buf <= end) + *buf = c; + ++buf; + } + } + while (i < precision--) { + if (buf <= end) + *buf = '0'; + ++buf; + } + while (i-- > 0) { + if (buf <= end) + *buf = tmp[i]; + ++buf; + } + while (size-- > 0) { + if (buf <= end) + *buf = ' '; + ++buf; + } + return buf; +} + +static char* +string(char* buf, char* end, const char* s, int len, int field_width, int precision, int flags) +{ + int i; + char c; + + c = (flags & ZEROPAD) ? '0' : ' '; + + if (s == NULL) + { + s = "<NULL>"; + len = 6; + } + else + { + if (len == -1) + { + len = 0; + while ((unsigned int)len < (unsigned int)precision && s[len]) + len++; + } + else + { + if ((unsigned int)len > (unsigned int)precision) + len = precision; + } + } + if (!(flags & LEFT)) + while (len < field_width--) + { + if (buf <= end) + *buf = c; + ++buf; + } + for (i = 0; i < len; ++i) + { + if (buf <= end) + *buf = *s++; + ++buf; + } + while (len < field_width--) + { + if (buf <= end) + *buf = ' '; + ++buf; + } + return buf; +} + +static char* +stringw(char* buf, char* end, const wchar_t* sw, int len, int field_width, int precision, int flags) +{ + int i; + char c; + + c = (flags & ZEROPAD) ? '0' : ' '; + + if (sw == NULL) + { + sw = L"<NULL>"; + len = 6; + } + else + { + if (len == -1) + { + len = 0; + while ((unsigned int)len < (unsigned int)precision && sw[len]) + len++; + } + else + { + if ((unsigned int)len > (unsigned int)precision) + len = precision; + } + } + if (!(flags & LEFT)) + while (len < field_width--) + { + if (buf <= end) + *buf = c; + buf++; + } + for (i = 0; i < len; ++i) + { + if (buf <= end) + *buf = (unsigned char)(*sw++); + buf++; + } + while (len < field_width--) + { + if (buf <= end) + *buf = ' '; + buf++; + } + return buf; +} + +/* + * @implemented + */ +int __cdecl _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args) +{ + int len; + unsigned long long num; + double _double; + + int base; + char *str, *end; + const char *s; + const wchar_t *sw; + + int flags; /* flags to number() */ + + int field_width; /* width of output field */ + int precision; /* min. # of digits for integers; max + number of chars for from string */ + int qualifier; /* 'h', 'l', 'L', 'I' or 'w' for integer fields */ + + /* clear the string buffer with zero so we do not need NULL terment it at end */ + + str = buf; + end = buf + cnt - 1; + if (end < buf - 1) { + end = ((char *) -1); + cnt = end - buf + 1; + } + + for ( ; *fmt ; ++fmt) { + if (*fmt != '%') { + if (str <= end) + *str = *fmt; + ++str; + continue; + } + + /* process flags */ + flags = 0; + repeat: + ++fmt; /* this also skips first '%' */ + switch (*fmt) { + case '-': flags |= LEFT; goto repeat; + case '+': flags |= PLUS; goto repeat; + case ' ': flags |= SPACE; goto repeat; + case '#': flags |= SPECIAL; goto repeat; + case '0': flags |= ZEROPAD; goto repeat; + } + + /* get field width */ + field_width = -1; + if (isdigit(*fmt)) + field_width = skip_atoi(&fmt); + else if (*fmt == '*') { + ++fmt; + /* it's the next argument */ + field_width = va_arg(args, int); + if (field_width < 0) { + field_width = -field_width; + flags |= LEFT; + } + } + + /* get the precision */ + precision = -1; + if (*fmt == '.') { + ++fmt; + if (isdigit(*fmt)) + precision = skip_atoi(&fmt); + else if (*fmt == '*') { + ++fmt; + /* it's the next argument */ + precision = va_arg(args, int); + } + if (precision < 0) + precision = 0; + } + + /* get the conversion qualifier */ + qualifier = -1; + if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'w') { + qualifier = *fmt; + ++fmt; + } else if (*fmt == 'I' && *(fmt+1) == '6' && *(fmt+2) == '4') { + qualifier = *fmt; + fmt += 3; + } else if (*fmt == 'I' && *(fmt+1) == '3' && *(fmt+2) == '2') { + qualifier = 'l'; + fmt += 3; + } else if (*fmt == 'F' && *(fmt+1) == 'p') { + fmt += 1; + flags |= REMOVEHEX; + } + + /* default base */ + base = 10; + + switch (*fmt) { + case 'c': /* finished */ + if (qualifier == 'l' || qualifier == 'w') { + wchar_t sw1[2]; + /* print unicode string */ + sw1[0] = (wchar_t) va_arg(args, int); + sw1[1] = 0; + str = stringw(str, end, (wchar_t *)&sw1, -1, field_width, precision, flags); + } else { + char s1[2]; + /* print ascii string */ + s1[0] = ( unsigned char) va_arg(args, int); + s1[1] = 0; + str = string(str, end, (char *)&s1, -1, field_width, precision, flags); + } + continue; + + case 'C': /* finished */ + if (!(flags & LEFT)) + while (--field_width > 0) { + if (str <= end) + *str = ' '; + ++str; + } + if (qualifier == 'h') { + if (str <= end) + *str = (unsigned char) va_arg(args, int); + ++str; + } else { + if (str <= end) + *str = (unsigned char)(wchar_t) va_arg(args, int); + ++str; + } + while (--field_width > 0) { + if (str <= end) + *str = ' '; + ++str; + } + continue; + + case 's': /* finished */ + if (qualifier == 'l' || qualifier == 'w') { + /* print unicode string */ + sw = va_arg(args, wchar_t *); + str = stringw(str, end, sw, -1, field_width, precision, flags); + } else { + /* print ascii string */ + s = va_arg(args, char *); + str = string(str, end, s, -1, field_width, precision, flags); + } + continue; + + case 'S': + if (qualifier == 'h') { + /* print ascii string */ + s = va_arg(args, char *); + str = string(str, end, s, -1, field_width, precision, flags); + } else { + /* print unicode string */ + sw = va_arg(args, wchar_t *); + str = stringw(str, end, sw, -1, field_width, precision, flags); + } + continue; + + case 'Z': + if (qualifier == 'w') { + /* print counted unicode string */ + PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING); + if ((pus == NULL) || (pus->Buffer == NULL)) { + sw = NULL; + len = -1; + } else { + sw = pus->Buffer; + len = pus->Length / sizeof(WCHAR); + } + str = stringw(str, end, sw, len, field_width, precision, flags); + } else { + /* print counted ascii string */ + PANSI_STRING pus = va_arg(args, PANSI_STRING); + if ((pus == NULL) || (pus->Buffer == NULL)) { + s = NULL; + len = -1; + } else { + s = pus->Buffer; + len = pus->Length; + } + str = string(str, end, s, len, field_width, precision, flags); + } + continue; + + case 'p': + if ((flags & LARGE) == 0) + flags |= LARGE; + + if (field_width == -1) { + field_width = 2 * sizeof(void *); + flags |= ZEROPAD; + } + str = number(str, end, + (ULONG_PTR) va_arg(args, void *), 16, + field_width, precision, flags); + continue; + + case 'n': + /* FIXME: What does C99 say about the overflow case here? */ + if (qualifier == 'l') { + long * ip = va_arg(args, long *); + *ip = (str - buf); + } else { + int * ip = va_arg(args, int *); + *ip = (str - buf); + } + continue; + + /* float number formats - set up the flags and "break" */ + case 'e': + case 'E': + case 'f': + case 'g': + case 'G': + _double = (double)va_arg(args, double); + if ( _isnan(_double) ) { + s = "Nan"; + len = 3; + while ( len > 0 ) { + if (str <= end) + *str = *s++; + ++str; + len --; + } + } else if ( _isinf(_double) < 0 ) { + s = "-Inf"; + len = 4; + while ( len > 0 ) { + if (str <= end) + *str = *s++; + ++str; + len --; + } + } else if ( _isinf(_double) > 0 ) { + s = "+Inf"; + len = 4; + while ( len > 0 ) { + if (str <= end) + *str = *s++; + ++str; + len --; + } + } else { + if ( precision == -1 ) + precision = 6; + str = numberf(str, end, (int)_double, base, field_width, precision, flags); + } + + continue; + + + /* integer number formats - set up the flags and "break" */ + case 'o': + base = 8; + break; + + case 'b': + base = 2; + break; + + case 'X': + flags |= LARGE; + case 'x': + base = 16; + break; + + case 'd': + case 'i': + flags |= SIGN; + case 'u': + break; + + default: + if (*fmt) { + if (str <= end) + *str = *fmt; + ++str; + } else + --fmt; + continue; + } + + if (qualifier == 'I') + num = va_arg(args, unsigned long long); + else if (qualifier == 'l') { + if (flags & SIGN) + num = va_arg(args, long); + else + num = va_arg(args, unsigned long); + } + else if (qualifier == 'h') { + if (flags & SIGN) + num = va_arg(args, int); + else + num = va_arg(args, unsigned int); + } + else { + if (flags & SIGN) + num = va_arg(args, int); + else + num = va_arg(args, unsigned int); + } + str = number(str, end, num, base, field_width, precision, flags); + } + if (str <= end) + *str = '\0'; + else if (cnt > 0) + /* don't write out a null byte if the buf size is zero */ + *end = '\0'; + return str-buf; +} + + +/* + * @implemented + */ +int sprintf(char * buf, const char *fmt, ...) +{ + va_list args; + int i; + + va_start(args, fmt); + i=_vsnprintf(buf,MAXLONG,fmt,args); + va_end(args); + return i; +} + + +/* + * @implemented + */ +int _snprintf(char * buf, size_t cnt, const char *fmt, ...) +{ + va_list args; + int i; + + va_start(args, fmt); + i=_vsnprintf(buf,cnt,fmt,args); + va_end(args); + return i; +} + + +/* + * @implemented + */ +int __cdecl vsprintf(char *buf, const char *fmt, va_list args) +{ + return _vsnprintf(buf,MAXLONG,fmt,args); +} + +/* EOF */ Propchange: trunk/reactos/dll/3rdparty/freetype/sprintf.c ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 10 months
1
0
0
0
[tkreuzer] 39928: Make freetype ddi compliant, by linking to win32k only. Clean up excessive header usage in rosglue.c
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 10 05:49:45 2009 New Revision: 39928 URL:
http://svn.reactos.org/svn/reactos?rev=39928&view=rev
Log: Make freetype ddi compliant, by linking to win32k only. Clean up excessive header usage in rosglue.c Modified: trunk/reactos/dll/3rdparty/freetype/freetype.rbuild trunk/reactos/dll/3rdparty/freetype/rosglue.c Modified: trunk/reactos/dll/3rdparty/freetype/freetype.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/freetype/free…
============================================================================== --- trunk/reactos/dll/3rdparty/freetype/freetype.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/freetype/freetype.rbuild [iso-8859-1] Tue Mar 10 05:49:45 2009 @@ -13,7 +13,8 @@ <if property="NSWPAT" value="1"> <define name="TT_CONFIG_OPTION_BYTECODE_INTERPRETER" /> </if> - <library>ntoskrnl</library> + <library>win32k</library> + <library>libcntpr</library> <if property="ARCH" value="i386"> <directory name="i386"> <file>setjmplongjmp.s</file> Modified: trunk/reactos/dll/3rdparty/freetype/rosglue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/freetype/rosg…
============================================================================== --- trunk/reactos/dll/3rdparty/freetype/rosglue.c [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/freetype/rosglue.c [iso-8859-1] Tue Mar 10 05:49:45 2009 @@ -8,13 +8,11 @@ * NOTES: */ -#include <ntddk.h> -#include <ctype.h> -#include <errno.h> -#include <setjmp.h> +#include <windef.h> +#include <wingdi.h> +#include <winddi.h> +#include <stdarg.h> #include <stdio.h> -#include <stdlib.h> -#include <string.h> #define NDEBUG #include <debug.h> @@ -26,7 +24,16 @@ * First some generic routines */ +ULONG +DbgPrint(IN PCCH Format, IN ...) +{ + va_list args; + va_start(args, Format); + EngDebugPrint("ft2: ", (PCHAR)Format, args); + va_end(args); + return 0; +} /* * Memory allocation @@ -42,7 +49,7 @@ { void *Object; - Object = ExAllocatePoolWithTag(PagedPool, sizeof(size_t) + Size, TAG_FREETYPE); + Object = EngAllocMem(0, sizeof(size_t) + Size, TAG_FREETYPE); if (NULL != Object) { *((size_t *) Object) = Size; @@ -58,7 +65,7 @@ void *NewObject; size_t CopySize; - NewObject = ExAllocatePoolWithTag(PagedPool, sizeof(size_t) + Size, TAG_FREETYPE); + NewObject = EngAllocMem(0, sizeof(size_t) + Size, TAG_FREETYPE); if (NULL != NewObject) { *((size_t *) NewObject) = Size; @@ -69,7 +76,7 @@ CopySize = Size; } memcpy(NewObject, Object, CopySize); - ExFreePool((size_t *) Object - 1); + EngFreeMem((size_t *) Object - 1); } return NewObject; @@ -78,7 +85,7 @@ void free(void *Object) { - ExFreePool((size_t *) Object - 1); + EngFreeMem((size_t *) Object - 1); } /*
15 years, 10 months
1
0
0
0
[tkreuzer] 39927: Call ExFreePoolWithTag with 0 tag from ExFreePool instead of vice versa, bugcheck system, when Block is not inside any pool.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 10 05:16:38 2009 New Revision: 39927 URL:
http://svn.reactos.org/svn/reactos?rev=39927&view=rev
Log: Call ExFreePoolWithTag with 0 tag from ExFreePool instead of vice versa, bugcheck system, when Block is not inside any pool. Modified: trunk/reactos/ntoskrnl/mm/pool.c Modified: trunk/reactos/ntoskrnl/mm/pool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pool.c?rev=399…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] Tue Mar 10 05:16:38 2009 @@ -14,6 +14,7 @@ #define NDEBUG #include <debug.h> +extern PVOID MiNonPagedPoolStart; extern ULONG MiNonPagedPoolLength; extern ULONG MmTotalPagedPoolQuota; extern ULONG MmTotalNonPagedPoolQuota; @@ -234,42 +235,70 @@ VOID NTAPI ExFreePool(IN PVOID Block) { - if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase + MmPagedPoolSize)) - { + ExFreePoolWithTag(Block, 0); +} + +/* + * @implemented + */ +VOID +NTAPI +ExFreePoolWithTag( + IN PVOID Block, + IN ULONG Tag) +{ + /* Check for paged pool */ + if (Block >= MmPagedPoolBase && + (char*)Block < ((char*)MmPagedPoolBase + MmPagedPoolSize)) + { + /* Validate tag */ + if (Tag != 0 && Tag != EiGetPagedPoolTag(Block)) + KeBugCheckEx(BAD_POOL_CALLER, + 0x0a, + (ULONG_PTR)Block, + EiGetPagedPoolTag(Block), + Tag); + + /* Validate IRQL */ if (KeGetCurrentIrql() > APC_LEVEL) - KeBugCheckEx(BAD_POOL_CALLER, 0x09, KeGetCurrentIrql(), PagedPool, (ULONG_PTR)Block); + KeBugCheckEx(BAD_POOL_CALLER, + 0x09, + KeGetCurrentIrql(), + PagedPool, + (ULONG_PTR)Block); + + /* Free from paged pool */ ExFreePagedPool(Block); } + + /* Check for non-paged pool */ + else if (Block >= MiNonPagedPoolStart && + (char*)Block < ((char*)MiNonPagedPoolStart + MiNonPagedPoolLength)) + { + /* Validate tag */ + if (Tag != 0 && Tag != EiGetNonPagedPoolTag(Block)) + KeBugCheckEx(BAD_POOL_CALLER, + 0x0a, + (ULONG_PTR)Block, + EiGetNonPagedPoolTag(Block), + Tag); + + /* Validate IRQL */ + if (KeGetCurrentIrql() > DISPATCH_LEVEL) + KeBugCheckEx(BAD_POOL_CALLER, + 0x09, + KeGetCurrentIrql(), + NonPagedPool, + (ULONG_PTR)Block); + + /* Free from non-paged pool */ + ExFreeNonPagedPool(Block); + } else { - if (KeGetCurrentIrql() > DISPATCH_LEVEL) - KeBugCheckEx(BAD_POOL_CALLER, 0x09, KeGetCurrentIrql(), NonPagedPool, (ULONG_PTR)Block); - ExFreeNonPagedPool(Block); - } -} - -/* - * @implemented - */ -VOID -NTAPI -ExFreePoolWithTag(IN PVOID Block, - IN ULONG Tag) -{ - ULONG BlockTag; - - if (Tag != 0) - { - if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase + MmPagedPoolSize)) - BlockTag = EiGetPagedPoolTag(Block); - else - BlockTag = EiGetNonPagedPoolTag(Block); - - if (BlockTag != Tag) - KeBugCheckEx(BAD_POOL_CALLER, 0x0a, (ULONG_PTR)Block, BlockTag, Tag); - } - - ExFreePool(Block); + /* Block was not inside any pool! */ + KeBugCheckEx(BAD_POOL_CALLER, 0x42, (ULONG_PTR)Block, 0, 0); + } } /*
15 years, 10 months
1
0
0
0
[janderwald] 39926: - Implement KSPROPERTY_PIN_PROPOSEDATAFORMAT - Add KSPROPERTY_PIN_PROPOSEDATAFORMAT handler to IPortWaveCyclic
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Mar 10 04:52:51 2009 New Revision: 39926 URL:
http://svn.reactos.org/svn/reactos?rev=39926&view=rev
Log: - Implement KSPROPERTY_PIN_PROPOSEDATAFORMAT - Add KSPROPERTY_PIN_PROPOSEDATAFORMAT handler to IPortWaveCyclic Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/connec…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] Tue Mar 10 04:52:51 2009 @@ -114,16 +114,11 @@ PIO_STACK_LOCATION IoStack; ULONG Size, Index; PVOID Buffer; + PKSDATARANGE_AUDIO *WaveFormatOut; + PKSDATAFORMAT_WAVEFORMATEX WaveFormatIn; IoStack = IoGetCurrentIrpStackLocation(Irp); Buffer = Irp->UserBuffer; - - if (Property->Flags != KSPROPERTY_TYPE_GET) - { - Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; - Irp->IoStatus.Information = 0; - return STATUS_NOT_IMPLEMENTED; - } switch(Property->Id) { @@ -306,6 +301,65 @@ Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = Size; break; + case KSPROPERTY_PIN_PROPOSEDATAFORMAT: + Pin = (KSP_PIN*)Property; + if (Pin->PinId >= DescriptorsCount) + { + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Irp->IoStatus.Information = 0; + break; + } + Size = sizeof(KSDATAFORMAT); + if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) + { + Irp->IoStatus.Information = Size; + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + break; + } + if (IoStack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(KSDATAFORMAT_WAVEFORMATEX)) + { + UNIMPLEMENTED + Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + Irp->IoStatus.Information = 0; + return STATUS_NOT_IMPLEMENTED; + } + + WaveFormatIn = (PKSDATAFORMAT_WAVEFORMATEX)Buffer; + if (!Descriptor[Pin->PinId].DataRanges || !Descriptor[Pin->PinId].DataRangesCount) + { + Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; + Irp->IoStatus.Information = 0; + return STATUS_UNSUCCESSFUL; + } + WaveFormatOut = (PKSDATARANGE_AUDIO*)Descriptor[Pin->PinId].DataRanges; + for(Index = 0; Index < Descriptor[Pin->PinId].DataRangesCount; Index++) + { + if (WaveFormatOut[Index]->DataRange.FormatSize != sizeof(KSDATARANGE_AUDIO)) + { + UNIMPLEMENTED + continue; + } + + if (WaveFormatOut[Index]->MinimumSampleFrequency > WaveFormatIn->WaveFormatEx.nSamplesPerSec || + WaveFormatOut[Index]->MaximumSampleFrequency < WaveFormatIn->WaveFormatEx.nSamplesPerSec || + WaveFormatOut[Index]->MinimumBitsPerSample > WaveFormatIn->WaveFormatEx.wBitsPerSample || + WaveFormatOut[Index]->MaximumBitsPerSample < WaveFormatIn->WaveFormatEx.wBitsPerSample || + WaveFormatOut[Index]->MaximumChannels < WaveFormatIn->WaveFormatEx.nChannels) + { + Irp->IoStatus.Status = STATUS_NO_MATCH; + Irp->IoStatus.Information = 0; + return STATUS_NO_MATCH; + } + else + { + Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Information = 0; + return STATUS_SUCCESS; + } + } + Irp->IoStatus.Status = STATUS_NO_MATCH; + Irp->IoStatus.Information = 0; + return STATUS_NO_MATCH; default: DPRINT1("Unhandled property request %x\n", Property->Id); Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1] Tue Mar 10 04:52:51 2009 @@ -41,7 +41,7 @@ }; DEFINE_KSPROPERTY_TOPOLOGYSET(PortFilterWaveCyclicTopologySet, TopologyPropertyHandler); -DEFINE_KSPROPERTY_PINSETCONSTRAINED(PortFilterWaveCyclicPinSet, PinPropertyHandler, PinPropertyHandler, PinPropertyHandler); +DEFINE_KSPROPERTY_PINPROPOSEDATAFORMAT(PortFilterWaveCyclicPinSet, PinPropertyHandler, PinPropertyHandler, PinPropertyHandler); KSPROPERTY_SET WaveCyclicPropertySet[] = { Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] Tue Mar 10 04:52:51 2009 @@ -241,4 +241,22 @@ GetDeviceObject( IPortWaveCyclic* iface); + +#define DEFINE_KSPROPERTY_PINPROPOSEDATAFORMAT(PinSet,\ + PropGeneral, PropInstances, PropIntersection)\ +DEFINE_KSPROPERTY_TABLE(PinSet) {\ + DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\ + DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\ + DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_PROPOSEDATAFORMAT(PropGeneral)\ +} + #endif Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c [iso-8859-1] Tue Mar 10 04:52:51 2009 @@ -81,6 +81,7 @@ case KSPROPERTY_PIN_COMMUNICATION: case KSPROPERTY_PIN_CATEGORY: case KSPROPERTY_PIN_NAME: + case KSPROPERTY_PIN_PROPOSEDATAFORMAT: Status = KsPinPropertyHandler(Irp, Request, Data, Descriptor->Factory.PinDescriptorCount, Descriptor->Factory.KsPinDescriptor); break; case KSPROPERTY_PIN_GLOBALCINSTANCES: @@ -102,7 +103,6 @@ default: Status = STATUS_NOT_FOUND; } - return Status; }
15 years, 10 months
1
0
0
0
[ros-arm-bringup] 39925: - Implement a new Hyperspace Mapping Interface: - The new interface is portable and much faster than before. For example, unmapping a hyperpage is almost a one-line operation. - The new interface is also thread-safe and uses the EPROCESS hyperspace spinlock. - However, in order to isolate from React Mm internals, the Hyper IRQL and Process are stored as globals, so this will not work on SMP. - For now, mapping vs. zero PTEs are not treated differently, but the two interf
by ros-arm-bringup@svn.reactos.org
Author: ros-arm-bringup Date: Tue Mar 10 03:31:14 2009 New Revision: 39925 URL:
http://svn.reactos.org/svn/reactos?rev=39925&view=rev
Log: - Implement a new Hyperspace Mapping Interface: - The new interface is portable and much faster than before. For example, unmapping a hyperpage is almost a one-line operation. - The new interface is also thread-safe and uses the EPROCESS hyperspace spinlock. - However, in order to isolate from React Mm internals, the Hyper IRQL and Process are stored as globals, so this will not work on SMP. - For now, mapping vs. zero PTEs are not treated differently, but the two interfaces have been separated pending future work. - Performance tests with _rdtsc resulted in an improvement of over 300% compared to the old interface. - Hyperspace mappings are frequent, so the improvement is noticeable during startup (3/10ths of a second). - This also fixes incorrect initializtion of hyperspace -- pages were zeroed out (which requires hyperspace) before hyperspace was created. Added: trunk/reactos/ntoskrnl/mm/hypermap.c (with props) Modified: trunk/reactos/ntoskrnl/include/internal/i386/mm.h trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/mm/i386/page.c trunk/reactos/ntoskrnl/mm/kmap.c trunk/reactos/ntoskrnl/mm/mminit.c trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild Modified: trunk/reactos/ntoskrnl/include/internal/i386/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] Tue Mar 10 03:31:14 2009 @@ -20,6 +20,8 @@ ((PMMPTE)(((((ULONG)(x)) >> 22) << 2) + PAGEDIRECTORY_MAP)) #define MiAddressToPte(x) \ ((PMMPTE)(((((ULONG)(x)) >> 12) << 2) + PAGETABLE_MAP)) +#define MiAddressToPteOffset(x) \ + ((((ULONG)(x)) << 10) >> 22) #define ADDR_TO_PAGE_TABLE(v) (((ULONG)(v)) / (1024 * PAGE_SIZE)) #define ADDR_TO_PDE_OFFSET(v) ((((ULONG)(v)) / (1024 * PAGE_SIZE))) Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Tue Mar 10 03:31:14 2009 @@ -58,6 +58,13 @@ /* Number of list heads to use */ #define MI_FREE_POOL_LISTS 4 + +#define HYPER_SPACE (0xC0400000) + +#define MI_HYPERSPACE_PTES (256 - 1) +#define MI_MAPPING_RANGE_START (ULONG)HYPER_SPACE +#define MI_MAPPING_RANGE_END (MI_MAPPING_RANGE_START + \ + MI_HYPERSPACE_PTES * PAGE_SIZE) /* Signature of free pool blocks */ #define MM_FREE_POOL_TAG TAG('F', 'r', 'p', 'l') @@ -1060,15 +1067,45 @@ PVOID Context ); +/* hypermap.c *****************************************************************/ + +extern PEPROCESS HyperProcess; +extern KIRQL HyperIrql; + +PVOID +NTAPI +MiMapPageInHyperSpace(IN PEPROCESS Process, + IN PFN_NUMBER Page, + IN PKIRQL OldIrql); + +VOID +NTAPI +MiUnmapPageInHyperSpace(IN PEPROCESS Process, + IN PVOID Address, + IN KIRQL OldIrql); + +PVOID +NTAPI +MiMapPagesToZeroInHyperSpace(IN PFN_NUMBER Page); + +VOID +NTAPI +MiUnmapPagesInZeroSpace(IN PVOID Address); + +// +// ReactOS Compatibility Layer +// +PVOID +FORCEINLINE +MmCreateHyperspaceMapping(IN PFN_NUMBER Page) +{ + HyperProcess = (PEPROCESS)KeGetCurrentThread()->ApcState.Process; + return MiMapPageInHyperSpace(HyperProcess, Page, &HyperIrql); +} + +#define MmDeleteHyperspaceMapping(x) MiUnmapPageInHyperSpace(HyperProcess, x, HyperIrql); + /* i386/page.c *********************************************************/ - -PVOID -NTAPI -MmCreateHyperspaceMapping(PFN_TYPE Page); - -PFN_TYPE -NTAPI -MmDeleteHyperspaceMapping(PVOID Address); NTSTATUS NTAPI Added: trunk/reactos/ntoskrnl/mm/hypermap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/hypermap.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/hypermap.c (added) +++ trunk/reactos/ntoskrnl/mm/hypermap.c [iso-8859-1] Tue Mar 10 03:31:14 2009 @@ -1,0 +1,197 @@ +/* + * PROJECT: ReactOS Kernel + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: ntoskrnl/mm/hypermap.c + * PURPOSE: Hyperspace Mapping Functionality + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include <ntoskrnl.h> +#define NDEBUG +#include <debug.h> + +/* GLOBALS ********************************************************************/ + +PMMPTE MmFirstReservedMappingPte; +PMMPTE MmLastReservedMappingPte; +MMPTE HyperTemplatePte; +PEPROCESS HyperProcess; +KIRQL HyperIrql; + +/* PRIVATE FUNCTIONS **********************************************************/ + +VOID +NTAPI +MiInitHyperSpace(VOID) +{ + PMMPTE PointerPte; + + // + // Get the hyperspace PTE and zero out the page table + // + PointerPte = MiAddressToPte(HYPER_SPACE); + RtlZeroMemory(PointerPte, PAGE_SIZE); + + // + // Setup mapping PTEs + // + MmFirstReservedMappingPte = MiAddressToPte(MI_MAPPING_RANGE_START); + MmLastReservedMappingPte = MiAddressToPte(MI_MAPPING_RANGE_END); + MmFirstReservedMappingPte->u.Hard.PageFrameNumber = MI_HYPERSPACE_PTES; +} + +PVOID +NTAPI +MiMapPageInHyperSpace(IN PEPROCESS Process, + IN PFN_NUMBER Page, + IN PKIRQL OldIrql) +{ + MMPTE TempPte; + PMMPTE PointerPte; + PFN_NUMBER Offset; + PVOID Address; + + // + // Never accept page 0 + // + ASSERT(Page != 0); + + // + // Build the PTE + // + TempPte = HyperTemplatePte; + TempPte.u.Hard.PageFrameNumber = Page; + + // + // Pick the first hyperspace PTE + // + PointerPte = MmFirstReservedMappingPte; + + // + // Acquire the hyperlock + // + ASSERT(Process == PsGetCurrentProcess()); + KeAcquireSpinLock(&Process->HyperSpaceLock, OldIrql); + + // + // Now get the first free PTE + // + Offset = PFN_FROM_PTE(PointerPte); + if (!Offset) + { + // + // Reset the PTEs + // + Offset = MI_HYPERSPACE_PTES; + KeFlushProcessTb(); + } + + // + // Prepare the next PTE + // + PointerPte->u.Hard.PageFrameNumber = Offset - 1; + + // + // Write the current PTE + // + PointerPte += Offset; + ASSERT(PointerPte->u.Hard.Valid == 0); + ASSERT(TempPte.u.Hard.Valid == 1); + *PointerPte = TempPte; + + // + // Return the address + // + Address = (PVOID)((ULONG_PTR)PointerPte << 10); + return Address; +} + +VOID +NTAPI +MiUnmapPageInHyperSpace(IN PEPROCESS Process, + IN PVOID Address, + IN KIRQL OldIrql) +{ + ASSERT(Process == PsGetCurrentProcess()); + + // + // Blow away the mapping + // + MiAddressToPte(Address)->u.Long = 0; + + // + // Release the hyperlock + // + ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); + KeReleaseSpinLock(&Process->HyperSpaceLock, OldIrql); +} + +PVOID +NTAPI +MiMapPagesToZeroInHyperSpace(IN PFN_NUMBER Page) +{ + MMPTE TempPte; + PMMPTE PointerPte; + PFN_NUMBER Offset; + PVOID Address; + + // + // Never accept page 0 + // + ASSERT(Page != 0); + + // + // Build the PTE + // + TempPte = HyperTemplatePte; + TempPte.u.Hard.PageFrameNumber = Page; + + // + // Pick the first hyperspace PTE + // + PointerPte = MmFirstReservedMappingPte; + + // + // Now get the first free PTE + // + Offset = PFN_FROM_PTE(PointerPte); + if (!Offset) + { + // + // Reset the PTEs + // + Offset = MI_HYPERSPACE_PTES; + KeFlushProcessTb(); + } + + // + // Prepare the next PTE + // + PointerPte->u.Hard.PageFrameNumber = Offset - 1; + + // + // Write the current PTE + // + PointerPte += Offset; + ASSERT(PointerPte->u.Hard.Valid == 0); + ASSERT(TempPte.u.Hard.Valid == 1); + *PointerPte = TempPte; + + // + // Return the address + // + Address = (PVOID)((ULONG_PTR)PointerPte << 10); + return Address; +} + +VOID +NTAPI +MiUnmapPagesInZeroSpace(IN PVOID Address) +{ + // + // Blow away the mapping + // + MiAddressToPte(Address)->u.Long = 0; +} Propchange: trunk/reactos/ntoskrnl/mm/hypermap.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/ntoskrnl/mm/hypermap.c ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: trunk/reactos/ntoskrnl/mm/i386/page.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Tue Mar 10 03:31:14 2009 @@ -1069,88 +1069,6 @@ return p; } -PVOID -NTAPI -MmCreateHyperspaceMapping(PFN_TYPE Page) -{ - PVOID Address; - ULONG i; - - ULONG Entry; - PULONG Pte; - Entry = PFN_TO_PTE(Page) | PA_PRESENT | PA_READWRITE; - Pte = (PULONG)MiAddressToPte(HYPERSPACE) + Page % 1024; - if (Page & 1024) - { - for (i = Page % 1024; i < 1024; i++, Pte++) - { - if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0)) - { - break; - } - } - if (i >= 1024) - { - Pte = (PULONG)MiAddressToPte(HYPERSPACE); - for (i = 0; i < Page % 1024; i++, Pte++) - { - if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0)) - { - break; - } - } - if (i >= Page % 1024) - { - KeBugCheck(MEMORY_MANAGEMENT); - } - } - } - else - { - for (i = Page % 1024; (LONG)i >= 0; i--, Pte--) - { - if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0)) - { - break; - } - } - if ((LONG)i < 0) - { - Pte = (PULONG)MiAddressToPte(HYPERSPACE) + 1023; - for (i = 1023; i > Page % 1024; i--, Pte--) - { - if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0)) - { - break; - } - } - if (i <= Page % 1024) - { - KeBugCheck(MEMORY_MANAGEMENT); - } - } - } - Address = (PVOID)((ULONG_PTR)HYPERSPACE + i * PAGE_SIZE); - __invlpg(Address); - return Address; -} - -PFN_TYPE -NTAPI -MmDeleteHyperspaceMapping(PVOID Address) -{ - PFN_TYPE Pfn; - ULONG Entry; - - ASSERT (IS_HYPERSPACE(Address)); - - Entry = InterlockedExchangePte(MiAddressToPte(Address), 0); - Pfn = PTE_TO_PFN(Entry); - - __invlpg(Address); - return Pfn; -} - VOID NTAPI MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size) @@ -1187,6 +1105,8 @@ } } +extern MMPTE HyperTemplatePte; + VOID INIT_FUNCTION NTAPI @@ -1196,6 +1116,12 @@ PULONG CurrentPageDirectory = (PULONG)PAGEDIRECTORY_MAP; DPRINT("MmInitGlobalKernelPageDirectory()\n"); + + // + // Setup template + // + HyperTemplatePte.u.Long = (PA_PRESENT | PA_READWRITE | PA_DIRTY | PA_ACCESSED); + if (Ke386GlobalPagesEnabled) HyperTemplatePte.u.Long |= PA_BIT_GLOBAL; for (i = ADDR_TO_PDE_OFFSET(MmSystemRangeStart); i < 1024; i++) { Modified: trunk/reactos/ntoskrnl/mm/kmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/kmap.c?rev=399…
============================================================================== --- trunk/reactos/ntoskrnl/mm/kmap.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/kmap.c [iso-8859-1] Tue Mar 10 03:31:14 2009 @@ -22,13 +22,13 @@ { PVOID TempAddress; - TempAddress = MmCreateHyperspaceMapping(Page); + TempAddress = MiMapPagesToZeroInHyperSpace(Page); if (TempAddress == NULL) { return(STATUS_NO_MEMORY); } memset(TempAddress, 0, PAGE_SIZE); - MmDeleteHyperspaceMapping(TempAddress); + MiUnmapPagesInZeroSpace(TempAddress); return(STATUS_SUCCESS); } Modified: trunk/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Tue Mar 10 03:31:14 2009 @@ -351,6 +351,11 @@ return LastKrnlPhysAddr << PAGE_SHIFT; } + +VOID +NTAPI +MiInitHyperSpace(VOID); + VOID INIT_FUNCTION NTAPI @@ -434,6 +439,9 @@ /* Unmap low memory */ MmDeletePageTable(NULL, 0); + + /* Initialize hyperspace */ + MiInitHyperSpace(); /* Intialize memory areas */ MmInitVirtualMemory(); Modified: trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl-generic.…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Tue Mar 10 03:31:14 2009 @@ -365,6 +365,7 @@ <file>cont.c</file> <file>drvlck.c</file> <file>freelist.c</file> + <file>hypermap.c</file> <file>iospace.c</file> <file>kmap.c</file> <file>marea.c</file>
15 years, 10 months
1
0
0
0
[cgutman] 39924: - Remove some redundant code
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Mar 10 02:12:29 2009 New Revision: 39924 URL:
http://svn.reactos.org/svn/reactos?rev=39924&view=rev
Log: - Remove some redundant code Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Tue Mar 10 02:12:29 2009 @@ -76,8 +76,6 @@ OskitDumpBuffer( data, len ); return OSK_EINVAL; } - - RemoteAddress.Type = LocalAddress.Type = IP_ADDRESS_V4; if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) { TI_DbgPrint(MIN_TRACE,("No route to %s\n", A2S(&RemoteAddress)));
15 years, 10 months
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
49
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
Results per page:
10
25
50
100
200