[ros-diffs] [tkreuzer] 51189: [WIN32K] Make GdiTableSection a static variable and use it only from gdiobj.c

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Tue Mar 29 10:02:38 UTC 2011


Author: tkreuzer
Date: Tue Mar 29 10:02:38 2011
New Revision: 51189

URL: http://svn.reactos.org/svn/reactos?rev=51189&view=rev
Log:
[WIN32K]
Make GdiTableSection a static variable and use it only from gdiobj.c

Modified:
    trunk/reactos/subsystems/win32/win32k/include/gdiobj.h
    trunk/reactos/subsystems/win32/win32k/main/dllmain.c
    trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c

Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/gdiobj.h?rev=51189&r1=51188&r2=51189&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] Tue Mar 29 10:02:38 2011
@@ -47,6 +47,7 @@
   USHORT      cExclusiveLock;
   USHORT      BaseFlags;
   PTHREADINFO Tid;
+  EX_PUSH_LOCK pushlock;
 } BASEOBJECT, *POBJ;
 
 typedef struct _CLIENTOBJ
@@ -62,8 +63,6 @@
     BASEFLAG_READY_TO_DIE = 0x1000
 };
 
-extern PSECTION_OBJECT GdiTableSection;
-
 BOOL    INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
 BOOL    INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
 BOOL    INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
@@ -78,7 +77,7 @@
 PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj (HGDIOBJ hObj, DWORD ObjectType);
 VOID INTERNAL_CALL GDIOBJ_LockMultipleObjs(ULONG ulCount, IN HGDIOBJ* ahObj, OUT PGDIOBJ* apObj);
 
-PVOID   INTERNAL_CALL GDI_MapHandleTable(PSECTION_OBJECT SectionObject, PEPROCESS Process);
+PVOID   INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);
 
 INIT_FUNCTION
 NTSTATUS

Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/main/dllmain.c?rev=51189&r1=51188&r2=51189&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Tue Mar 29 10:02:38 2011
@@ -107,7 +107,7 @@
         if(Process->Peb != NULL)
         {
             /* map the gdi handle table to user land */
-            Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(GdiTableSection, Process);
+            Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(Process);
             Process->Peb->GdiDCAttributeList = GDI_BATCH_LIMIT;
         }
 
@@ -264,7 +264,7 @@
            if (Win32Thread->KeyboardLayout) pci->hKL = Win32Thread->KeyboardLayout->hkl;
            pci->dwTIFlags = Win32Thread->TIF_flags;
            /* CI may not have been initialized. */
-           if (!pci->pDeskInfo && Win32Thread->pDeskInfo) 
+           if (!pci->pDeskInfo && Win32Thread->pDeskInfo)
            {
               if (!pci->ulClientDelta) pci->ulClientDelta = DesktopHeapGetUserDelta();
 
@@ -440,7 +440,7 @@
     /* Register our per-process and per-thread structures. */
     PsEstablishWin32Callouts((PWIN32_CALLOUTS_FPNS)&CalloutData);
 
-#if 0 // DBG
+#if 1 // DBG
     /* Register service hook callbacks */
     KdSystemDebugControl('CsoR', DbgPreServiceHook, ID_Win32PreServiceHook, 0, 0, 0, 0);
     KdSystemDebugControl('CsoR', DbgPostServiceHook, ID_Win32PostServiceHook, 0, 0, 0, 0);

Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c?rev=51189&r1=51188&r2=51189&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Tue Mar 29 10:02:38 2011
@@ -70,7 +70,7 @@
 
 static LARGE_INTEGER ShortDelay;
 PGDI_HANDLE_TABLE GdiHandleTable = NULL;
-PSECTION_OBJECT GdiTableSection = NULL;
+static PSECTION_OBJECT GdiTableSection = NULL;
 
 /** INTERNAL FUNCTIONS ********************************************************/
 
@@ -1663,7 +1663,7 @@
 }
 
 PVOID INTERNAL_CALL
-GDI_MapHandleTable(PSECTION_OBJECT SectionObject, PEPROCESS Process)
+GDI_MapHandleTable(PEPROCESS Process)
 {
     PVOID MappedView = NULL;
     NTSTATUS Status;
@@ -1672,10 +1672,10 @@
 
     Offset.QuadPart = 0;
 
-    ASSERT(SectionObject != NULL);
+    ASSERT(GdiTableSection != NULL);
     ASSERT(Process != NULL);
 
-    Status = MmMapViewOfSection(SectionObject,
+    Status = MmMapViewOfSection(GdiTableSection,
                                 Process,
                                 &MappedView,
                                 0,




More information about the Ros-diffs mailing list