mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 13:34:53 +00:00
[WIN32K]
- allocate FAST_MUTEX objects from non paged pool. This should ix a bunch of weird testbot failures. Any suggestion on the TAG is welcome svn path=/trunk/; revision=55784
This commit is contained in:
parent
216a2fef8c
commit
e99ab8c0fc
|
@ -1,19 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#define TAG_STRING ' RTS' /* String */
|
||||
#define TAG_HOOK 'ohsU' /* Hook */
|
||||
#define TAG_MENUITEM 'emsU' /* Menu item */
|
||||
#define TAG_MSG 'GSEM' /* Message */
|
||||
#define TAG_USRMSG 'GSMU' /* User message */
|
||||
#define TAG_SBARINFO 'NIBS' /* Scrollbar info */
|
||||
#define TAG_TIMERBMP 'BMIT' /* Timers bitmap */
|
||||
#define TAG_WINSTA 'ATSW' /* Window station */
|
||||
#define TAG_FONT 'ETNF' /* Font entry */
|
||||
#define TAG_BEZIER 'RZEB' /* Bezier */
|
||||
#define TAG_SHAPE 'phSG' /* Shape */
|
||||
#define TAG_COLORMAP 'MLOC' /* Color map */
|
||||
#define TAG_GDIHNDTBLE 'bthG' /* GDI handle table */
|
||||
#define TAG_DIB ' BID' /* Dib */
|
||||
#define TAG_STRING ' RTS' /* String */
|
||||
#define TAG_HOOK 'ohsU' /* Hook */
|
||||
#define TAG_MENUITEM 'emsU' /* Menu item */
|
||||
#define TAG_MSG 'GSEM' /* Message */
|
||||
#define TAG_USRMSG 'GSMU' /* User message */
|
||||
#define TAG_SBARINFO 'NIBS' /* Scrollbar info */
|
||||
#define TAG_TIMERBMP 'BMIT' /* Timers bitmap */
|
||||
#define TAG_WINSTA 'ATSW' /* Window station */
|
||||
#define TAG_FONT 'ETNF' /* Font entry */
|
||||
#define TAG_BEZIER 'RZEB' /* Bezier */
|
||||
#define TAG_SHAPE 'phSG' /* Shape */
|
||||
#define TAG_COLORMAP 'MLOC' /* Color map */
|
||||
#define TAG_GDIHNDTBLE 'bthG' /* GDI handle table */
|
||||
#define TAG_DIB ' BID' /* Dib */
|
||||
#define TAG_INTERNAL_SYNC 'sync' /* Internal synchronization object. Waiting for a better suggestion than 'sync' */
|
||||
|
||||
/* GDI objects from the handle table */
|
||||
#define TAG_DC GDITAG_HMGR_LOOKASIDE_DC_TYPE
|
||||
|
|
|
@ -115,15 +115,3 @@ DWORD FASTCALL GreGetGlyphIndicesW(HDC,LPWSTR,INT,LPWORD,DWORD,DWORD);
|
|||
|
||||
#define IntUnLockProcessPrivateFonts(W32Process) \
|
||||
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&W32Process->PrivateFontListLock)
|
||||
|
||||
#define IntLockGlobalFonts \
|
||||
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&FontListLock)
|
||||
|
||||
#define IntUnLockGlobalFonts \
|
||||
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&FontListLock)
|
||||
|
||||
#define IntLockFreeType \
|
||||
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&FreeTypeLock)
|
||||
|
||||
#define IntUnLockFreeType \
|
||||
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&FreeTypeLock)
|
||||
|
|
|
@ -21,7 +21,7 @@ static LONG TimeLast = 0;
|
|||
/* Windows 2000 has room for 32768 window-less timers */
|
||||
#define NUM_WINDOW_LESS_TIMERS 32768
|
||||
|
||||
static FAST_MUTEX Mutex;
|
||||
static PFAST_MUTEX Mutex;
|
||||
static RTL_BITMAP WindowLessTimersBitMap;
|
||||
static PVOID WindowLessTimersBitMapBuffer;
|
||||
static ULONG HintIndex = 1;
|
||||
|
@ -29,10 +29,10 @@ static ULONG HintIndex = 1;
|
|||
ERESOURCE TimerLock;
|
||||
|
||||
#define IntLockWindowlessTimerBitmap() \
|
||||
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&Mutex)
|
||||
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(Mutex)
|
||||
|
||||
#define IntUnlockWindowlessTimerBitmap() \
|
||||
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&Mutex)
|
||||
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(Mutex)
|
||||
|
||||
#define TimerEnterExclusive() \
|
||||
{ \
|
||||
|
@ -584,8 +584,10 @@ NTAPI
|
|||
InitTimerImpl(VOID)
|
||||
{
|
||||
ULONG BitmapBytes;
|
||||
|
||||
ExInitializeFastMutex(&Mutex);
|
||||
|
||||
/* Allocate FAST_MUTEX from non paged pool */
|
||||
Mutex = ExAllocatePoolWithTag(NonPagedPool, sizeof(FAST_MUTEX), TAG_INTERNAL_SYNC);
|
||||
ExInitializeFastMutex(Mutex);
|
||||
|
||||
BitmapBytes = ROUND_UP(NUM_WINDOW_LESS_TIMERS, sizeof(ULONG) * 8) / 8;
|
||||
WindowLessTimersBitMapBuffer = ExAllocatePoolWithTag(NonPagedPool, BitmapBytes, TAG_TIMERBMP);
|
||||
|
|
|
@ -32,12 +32,24 @@ typedef struct _FONT_ENTRY
|
|||
|
||||
/* The FreeType library is not thread safe, so we have
|
||||
to serialize access to it */
|
||||
static FAST_MUTEX FreeTypeLock;
|
||||
static PFAST_MUTEX FreeTypeLock;
|
||||
|
||||
static LIST_ENTRY FontListHead;
|
||||
static FAST_MUTEX FontListLock;
|
||||
static PFAST_MUTEX FontListLock;
|
||||
static BOOL RenderingEnabled = TRUE;
|
||||
|
||||
#define IntLockGlobalFonts \
|
||||
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(FontListLock)
|
||||
|
||||
#define IntUnLockGlobalFonts \
|
||||
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(FontListLock)
|
||||
|
||||
#define IntLockFreeType \
|
||||
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(FreeTypeLock)
|
||||
|
||||
#define IntUnLockFreeType \
|
||||
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(FreeTypeLock)
|
||||
|
||||
#define MAX_FONT_CACHE 256
|
||||
|
||||
typedef struct _FONT_CACHE_ENTRY
|
||||
|
@ -128,8 +140,11 @@ InitFontSupport(VOID)
|
|||
InitializeListHead(&FontListHead);
|
||||
InitializeListHead(&FontCacheListHead);
|
||||
FontCacheNumEntries = 0;
|
||||
ExInitializeFastMutex(&FontListLock);
|
||||
ExInitializeFastMutex(&FreeTypeLock);
|
||||
/* Fast Mutexes must be allocated from non paged pool */
|
||||
FontListLock = ExAllocatePoolWithTag(NonPagedPool, sizeof(FAST_MUTEX), TAG_INTERNAL_SYNC);
|
||||
ExInitializeFastMutex(FontListLock);
|
||||
FreeTypeLock = ExAllocatePoolWithTag(NonPagedPool, sizeof(FAST_MUTEX), TAG_INTERNAL_SYNC);
|
||||
ExInitializeFastMutex(FreeTypeLock);
|
||||
|
||||
ulError = FT_Init_FreeType(&library);
|
||||
if (ulError)
|
||||
|
|
Loading…
Reference in a new issue