Author: greatlrd
Date: Wed Jan 2 11:47:46 2008
New Revision: 31554
URL: http://svn.reactos.org/svn/reactos?rev=31554&view=rev
Log:
implement DxEngLockShareSem
implement DxEngUnlockShareSem
Modified:
trunk/reactos/include/reactos/drivers/directx/dxeng.h
trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
Modified: trunk/reactos/include/reactos/drivers/directx/dxeng.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/di…
==============================================================================
--- trunk/reactos/include/reactos/drivers/directx/dxeng.h (original)
+++ trunk/reactos/include/reactos/drivers/directx/dxeng.h Wed Jan 2 11:47:46 2008
@@ -78,13 +78,15 @@
/* Notes : Set Gamma ramp */
BOOL DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Unuse);
-/* prototypes are not done yet, I need gather all my notes
- * to make them correct
+BOOLEAN DxEngLockShareSem();
+BOOLEAN DxEngUnlockShareSem();
+
+/* prototypes are not done yet, I need gather all my notes
+ * to make them correct
*/
DWORD DxEngCreateMemoryDC(DWORD x1);
DWORD DxEngScreenAccessCheck();
-DWORD DxEngLockShareSem();
-DWORD DxEngUnlockShareSem();
+
DWORD DxEngLockHdev(DWORD x1);
DWORD DxEngUnlockHdev(DWORD x1);
DWORD DxEngReferenceHdev(DWORD x1);
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Wed Jan 2 11:47:46 2008
@@ -10,6 +10,7 @@
#include <w32k.h>
#include <debug.h>
+ERESOURCE ghsemShareDevLock;
@@ -214,22 +215,57 @@
return FALSE;
}
-/************************************************************************/
-/* DxEngLockShareSem */
-/************************************************************************/
-DWORD DxEngLockShareSem()
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/************************************************************************/
-/* DxEngUnlockShareSem */
-/************************************************************************/
-DWORD DxEngUnlockShareSem()
-{
- UNIMPLEMENTED;
- return FALSE;
+/*++
+* @name DxEngLockShareSem
+* @implemented
+*
+* 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()
+{
+ BOOLEAN retVal = 0;
+
+ if (ExIsResourceAcquiredExclusiveLite(&ghsemShareDevLock) == FALSE)
+ {
+ KeEnterCriticalRegion();
+ retVal = ExAcquireResourceExclusiveLite(&ghsemShareDevLock, TRUE);
+ }
+
+ return retVal;
+}
+
+/*++
+* @name DxEngUnlockShareSem
+* @implemented
+*
+* 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()
+{
+ if (ExIsResourceAcquiredExclusiveLite(&ghsemShareDevLock) == TRUE)
+ {
+ ExReleaseResourceLite(&ghsemShareDevLock);
+ KeLeaveCriticalRegion();
+ }
+ return TRUE;
}
/************************************************************************/
@@ -415,9 +451,9 @@
* The DC handle
*
* @param DWORD type
-* value 1 = Is DC fullscreen
-* value 2 = Get Complexity of visible region.
-* value 3 = Get Driver hdev, which is a pPDev.
+* value 1 = Is DC fullscreen
+* value 2 = Get Complexity of visible region.
+* value 3 = Get Driver hdev, which is a pPDev.
*
* @return
* Return one of the type values
@@ -445,13 +481,13 @@
break;
case 3:
{
- /* Return the HDEV of this DC. */
+ /* Return the HDEV of this DC. */
retVal = (DWORD) pDC->pPDev;
break;
}
default:
/* if a valid type is not found, zero is returned */
- DPRINT1("Warning did not find type %d\n",type);
+ DPRINT1("Warning did not find type %d\n",type);
break;
}
DC_UnlockDc(pDC);
Author: zguo
Date: Wed Jan 2 08:44:59 2008
New Revision: 31553
URL: http://svn.reactos.org/svn/reactos?rev=31553&view=rev
Log:
Completion of editing current documentation in dxg
Modified:
trunk/reactos/drivers/directx/dxg/ddhmg.c
trunk/reactos/drivers/directx/dxg/historic.c
Modified: trunk/reactos/drivers/directx/dxg/ddhmg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/ddhmg.…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/ddhmg.c (original)
+++ trunk/reactos/drivers/directx/dxg/ddhmg.c Wed Jan 2 08:44:59 2008
@@ -35,14 +35,14 @@
* @name DdHmgCreate
* @implemented
*
-* The function DdHmgCreate is internal use in dxg.sys
-* It Create all DX kernel object that is need it, for create DX object.
+* The function DdHmgCreate is used internally in dxg.sys
+* It creates all DX kernel objects that are need it for creation of DX objects.
*
* @return
-* return FALSE for fail, return TRUE for sussess create DX object
+* Return FALSE for failure and TRUE for success in creating the DX object
*
* @remarks.
-* Only use internal in dxg.sys
+* Only used internally in dxg.sys
*--*/
BOOL
FASTCALL
@@ -81,14 +81,14 @@
* @name DdHmgDestroy
* @implemented
*
-* The function DdHmgDestroy is internal use in dxg.sys
-* It destore all DX kernel object
+* The function DdHmgDestroy is used internally in dxg.sys
+* It destroys all DX kernel objects
*
* @return
-* return FALSE for fail or noting to destore, return TRUE for sussess destore all dx object
+* Always returns true, as a failure here would result in a BSOD.
*
* @remarks.
-* Only use internal in dxg.sys
+* Only used internally in dxg.sys
*--*/
BOOL
FASTCALL
@@ -118,29 +118,29 @@
* @name DdHmgLock
* @implemented
*
-* The function DdHmgLock is internal use in dxg.sys
-* it lock a Dx kernel object
+* The function DdHmgLock is used internally in dxg.sys
+* It locks a DX kernel object
*
* @param HANDLE DdHandle
-* The handle we want lock
+* The handle we want locked
*
* @param UCHAR ObjectType
-* The type of the object we expected the handle contain
-* value 0 is for getting ?
-* value 1 is for getting EDD_DIRECTDRAW_LOCAL
-* value 2 is for getting EDD_SURFACE
-* value 3 is for getting ?
-* value 4 is for getting EDD_VIDEOPORT
-* value 5 is for getting EDD_MOTIONCOMP
+* The type of the object we expected the handle to contain
+* value 0 is for ?
+* value 1 is for EDD_DIRECTDRAW_LOCAL
+* value 2 is for EDD_SURFACE
+* value 3 is for ?
+* value 4 is for EDD_VIDEOPORT
+* value 5 is for EDD_MOTIONCOMP
* @param BOOLEAN LockOwned
-* if it need be EngAcquireSemaphore or not
+* If it needs to call EngAcquireSemaphore or not
*
* @return
-* return a EDD_* object, or NULL depnes if it success or not.
+* Returns an EDD_* object, or NULL if it fails
*
* @remarks.
-* Only use internal in dxg.sys
+* Only used internally in dxg.sys
*--*/
PVOID
FASTCALL
Modified: trunk/reactos/drivers/directx/dxg/historic.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/histor…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/historic.c (original)
+++ trunk/reactos/drivers/directx/dxg/historic.c Wed Jan 2 08:44:59 2008
@@ -15,7 +15,7 @@
* @name DxDxgGenericThunk
* @implemented
*
-* The function DxDxgGenericThunk redirect dx call to other thing.
+* The function DxDxgGenericThunk redirects DirectX calls to other functions.
*
* @param ULONG_PTR ulIndex
* The functions we want redirct
@@ -36,10 +36,10 @@
* Unknown
*
* @return
-* always return DDHAL_DRIVER_NOTHANDLED
+* Always returns DDHAL_DRIVER_NOTHANDLED
*
* @remarks.
-* This api are not longer use in Windows NT 2000/XP/2003
+* This function is no longer used in Windows NT 2000/XP/2003
*
*--*/
DWORD
@@ -59,7 +59,7 @@
* @name DxDdIoctl
* @implemented
*
-* The function DxDdIoctl is the ioctl call to diffent dx functions
+* The function DxDdIoctl is the ioctl call to diffent DirectX functions
*
* @param ULONG ulIoctl
* The ioctl code that we want call to
@@ -71,10 +71,10 @@
* The buffer size in bytes
*
* @return
-* always return DDERR_UNSUPPORTED
+* Always returns DDERR_UNSUPPORTED
*
* @remarks.
-* This api are not longer use in Windows NT 2000/XP/2003
+* This function is no longer used in Windows NT 2000/XP/2003
*
*--*/
DWORD