mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
implement DxEngLockShareSem
implement DxEngUnlockShareSem svn path=/trunk/; revision=31554
This commit is contained in:
parent
e71f4394b7
commit
57cfafda1d
2 changed files with 59 additions and 21 deletions
|
@ -78,13 +78,15 @@ BOOL DxEngUnlockDC(PDC pDC);
|
||||||
/* Notes : Set Gamma ramp */
|
/* Notes : Set Gamma ramp */
|
||||||
BOOL DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Unuse);
|
BOOL DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Unuse);
|
||||||
|
|
||||||
|
BOOLEAN DxEngLockShareSem();
|
||||||
|
BOOLEAN DxEngUnlockShareSem();
|
||||||
|
|
||||||
/* prototypes are not done yet, I need gather all my notes
|
/* prototypes are not done yet, I need gather all my notes
|
||||||
* to make them correct
|
* to make them correct
|
||||||
*/
|
*/
|
||||||
DWORD DxEngCreateMemoryDC(DWORD x1);
|
DWORD DxEngCreateMemoryDC(DWORD x1);
|
||||||
DWORD DxEngScreenAccessCheck();
|
DWORD DxEngScreenAccessCheck();
|
||||||
DWORD DxEngLockShareSem();
|
|
||||||
DWORD DxEngUnlockShareSem();
|
|
||||||
DWORD DxEngLockHdev(DWORD x1);
|
DWORD DxEngLockHdev(DWORD x1);
|
||||||
DWORD DxEngUnlockHdev(DWORD x1);
|
DWORD DxEngUnlockHdev(DWORD x1);
|
||||||
DWORD DxEngReferenceHdev(DWORD x1);
|
DWORD DxEngReferenceHdev(DWORD x1);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include <w32k.h>
|
#include <w32k.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
ERESOURCE ghsemShareDevLock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,22 +215,57 @@ DWORD DxEngScreenAccessCheck()
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/*++
|
||||||
/* DxEngLockShareSem */
|
* @name DxEngLockShareSem
|
||||||
/************************************************************************/
|
* @implemented
|
||||||
DWORD DxEngLockShareSem()
|
*
|
||||||
|
* The function DxEngLockShareSem doing share lock of ghsemShareDevLock
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* This function returns TRUE for susssess, or FALSE for fail, FALSE can only
|
||||||
|
* mean it being already lock.
|
||||||
|
*
|
||||||
|
* @remarks.
|
||||||
|
* it being use in diffent ntuser* functions and ntgdi*
|
||||||
|
* ReactOS specify it is not been inuse at moment
|
||||||
|
*SystemResourcesList
|
||||||
|
*--*/
|
||||||
|
BOOLEAN
|
||||||
|
DxEngLockShareSem()
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
BOOLEAN retVal = 0;
|
||||||
return FALSE;
|
|
||||||
|
if (ExIsResourceAcquiredExclusiveLite(&ghsemShareDevLock) == FALSE)
|
||||||
|
{
|
||||||
|
KeEnterCriticalRegion();
|
||||||
|
retVal = ExAcquireResourceExclusiveLite(&ghsemShareDevLock, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/*++
|
||||||
/* DxEngUnlockShareSem */
|
* @name DxEngUnlockShareSem
|
||||||
/************************************************************************/
|
* @implemented
|
||||||
DWORD DxEngUnlockShareSem()
|
*
|
||||||
|
* The function DxEngUnlockShareSem doing share unlock of ghsemShareDevLock
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* This function returns TRUE no matter what
|
||||||
|
*
|
||||||
|
* @remarks.
|
||||||
|
* ReactOS specify it is not been inuse at moment
|
||||||
|
*
|
||||||
|
*--*/
|
||||||
|
BOOLEAN
|
||||||
|
DxEngUnlockShareSem()
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
if (ExIsResourceAcquiredExclusiveLite(&ghsemShareDevLock) == TRUE)
|
||||||
return FALSE;
|
{
|
||||||
|
ExReleaseResourceLite(&ghsemShareDevLock);
|
||||||
|
KeLeaveCriticalRegion();
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue