- Add EngAcquireSemaphoreShared prototype
- implement RECTL_bIsWellOrdered
- implement DbgLookupDHPDEV
- start implementation of driver callback debug hooks

svn path=/trunk/; revision=56211
This commit is contained in:
Timo Kreuzer
2012-03-21 20:50:04 +00:00
parent 4447a83124
commit b8d5c066d9
4 changed files with 1302 additions and 2 deletions
File diff suppressed because it is too large Load Diff
+24 -1
View File
@@ -25,6 +25,29 @@ InitPDEVImpl()
return STATUS_SUCCESS;
}
#if DBG
PPDEVOBJ
NTAPI
DbgLookupDHPDEV(DHPDEV dhpdev)
{
PPDEVOBJ ppdev;
/* Lock PDEV list */
EngAcquireSemaphoreShared(ghsemPDEV);
/* Walk through the list of PDEVs */
for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
{
/* Compare with the given DHPDEV */
if (ppdev->dhpdev == dhpdev) break;
}
/* Unlock PDEV list */
EngReleaseSemaphore(ghsemPDEV);
return ppdev;
}
#endif
PPDEVOBJ
PDEVOBJ_AllocPDEV()
@@ -803,7 +826,7 @@ NtGdiGetDhpdev(
return NULL;
/* Lock PDEV list */
EngAcquireSemaphore(ghsemPDEV);
EngAcquireSemaphoreShared(ghsemPDEV);
/* Walk through the list of PDEVs */
for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
@@ -1,5 +1,10 @@
#pragma once
VOID
NTAPI
EngAcquireSemaphoreShared(
IN HSEMAPHORE hsem);
BOOL APIENTRY
IntEngMaskBlt(SURFOBJ *psoDest,
SURFOBJ *psoMask,
@@ -45,6 +45,14 @@ RECTL_bPointInRect(const RECTL *prcl, INT x, INT y)
y >= prcl->top && y < prcl->bottom);
}
BOOL
FORCEINLINE
RECTL_bIsWellOrdered(const RECTL *prcl)
{
return ((prcl->left <= prcl->right) &&
(prcl->top <= prcl->bottom));
}
BOOL
FASTCALL
RECTL_bUnionRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2);
@@ -57,6 +65,6 @@ VOID
FASTCALL
RECTL_vMakeWellOrdered(RECTL *prcl);
VOID
VOID
FASTCALL
RECTL_vInflateRect(RECTL *rect, INT dx, INT dy);