Changeset 6296 for trunk/src/win32k/dev32
- Timestamp:
- Jul 10, 2001, 6:41:10 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/dev32/d32Win32kOpenClose.c
r6215 r6296 1 /* $Id: d32Win32kOpenClose.c,v 1. 1 2001-07-08 02:53:18bird Exp $1 /* $Id: d32Win32kOpenClose.c,v 1.2 2001-07-10 16:39:16 bird Exp $ 2 2 * 3 3 * Open and Close handlers for the Win32k driver. … … 16 16 #define INCL_NOPMAPI 17 17 #define INCL_OS2KRNL_TK 18 #define INCL_OS2KRNL_SEM 19 #define INCL_OS2KRNL_LDR 18 20 #define INCL_OS2KRNL_PTDA 19 21 … … 52 54 USHORT _loadds _Far32 _Pascal Win32kOpen(PRP32OPENCLOSE pRpOpen) 53 55 { 54 PPTD pptd = GetTaskData(0); 56 APIRET rc; 57 PPTD pptd; 58 59 /* 60 * Take Loader semaphore as that currently protects everything in this driver... 61 */ 62 rc = LDRRequestSem(); 63 if (rc != NO_ERROR) 64 { 65 kprintf(("Win32kOpen: LDRRequestSem failed with rc = %d\n", rc)); 66 //return rc; 67 } 68 69 pptd = GetTaskData(0, TRUE); 55 70 if (pptd) 56 71 pptd->cUsage++; 57 72 58 73 pRpOpen = pRpOpen; 74 LDRClearSem(); 59 75 return STATUS_DONE; 60 76 } … … 70 86 USHORT _loadds _Far32 _Pascal Win32kClose(PRP32OPENCLOSE pRpClose) 71 87 { 72 PPTD pptd = GetTaskData(0); 88 APIRET rc; 89 PPTD pptd; 90 91 /* 92 * Take Loader semaphore as that currently protects everything in this driver... 93 */ 94 rc = LDRRequestSem(); 95 if (rc != NO_ERROR) 96 { 97 kprintf(("Win32kClose: LDRRequestSem failed with rc = %d\n", rc)); 98 //return rc; 99 } 100 101 pptd = GetTaskData(0, FALSE); 73 102 if (pptd) 74 103 { 75 104 if (pptd->cUsage > 0) 76 {77 APIRET rc;78 if ( pptd->pszzOdin32Env != NULL79 && (rc = D32Hlp_VMUnLock(&pptd->lockOdin32Env)) != NO_ERROR80 )81 {82 kprintf(("Win32kClose: VMUnLock failed with rc=%d\n", rc));83 }84 105 pptd->cUsage--; 85 }86 106 if (pptd->cUsage == 0) 87 107 RemoveTaskData(0); 88 108 } 89 109 pRpClose = pRpClose; 110 111 LDRClearSem(); 90 112 return STATUS_DONE; 91 113 }
Note:
See TracChangeset
for help on using the changeset viewer.