Changeset 168 for sbliveos2/trunk/drv16/dwavestrm.cpp
- Timestamp:
- Mar 23, 2001, 6:14:13 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sbliveos2/trunk/drv16/dwavestrm.cpp
r167 r168 33 33 #include "malloc.h" 34 34 35 36 35 void cdecl HookHandler(ULONG ulSysFileNum) 37 36 { … … 57 56 DevHelp_VMFree((LIN)temp->pBuffptr); 58 57 DevHelp_VMUnLock(temp->linLock); 59 free(temp->pLock);60 58 delete temp; 59 60 temp = (PSTREAMBUFFEREX)pStream->qhReturn.PopHead(); 61 61 } 62 62 return; … … 67 67 { 68 68 PSTREAMBUFFEREX pStreamBuf; 69 LIN linAddr;70 PULONG pLock;71 ULONG PageListCount;72 LIN linLock;73 int rc;69 LIN linAddr; 70 PULONG pLock; 71 ULONG PageListCount; 72 LIN linLock; 73 int rc; 74 74 75 p Lock = (PULONG)malloc(12);76 if(p Lock== NULL) {75 pStreamBuf = new STREAMBUFFEREX(uLength, (PSTREAMBUF)0); 76 if(pStreamBuf == NULL) { 77 77 DebugInt3(); 78 78 return 1; 79 79 } 80 80 81 pLock = &pStreamBuf->lock[0]; 82 81 83 rc = DevHelp_VirtToLin(SELECTOROF(pLock), OFFSETOF(pLock), &linLock); 82 84 if(rc) { 83 85 DebugInt3(); 86 delete pStreamBuf; 84 87 return rc; 85 88 } … … 88 91 if(rc) { 89 92 DebugInt3(); 90 DevHelp_VMFree(linAddr);93 delete pStreamBuf; 91 94 return rc; 92 95 } … … 95 98 if(rc) { 96 99 DebugInt3(); 100 DevHelp_VMUnLock(linLock); 101 delete pStreamBuf; 97 102 return rc; 98 103 } 99 100 pStreamBuf = new STREAMBUFFEREX(uLength, (PSTREAMBUF)linAddr, linLock, pLock);104 pStreamBuf->pBuffptr = (PSTREAMBUF)linAddr; 105 pStreamBuf->linLock = linLock; 101 106 102 107 return WAVESTREAM::Write((PSTREAMBUFFER)pStreamBuf); … … 111 116 if(ulStreamState == STREAM_STREAMING) {//means we're called during an interrupt 112 117 qhReturn.PushOnTail((PQUEUEELEMENT)temp); 113 DevHelp_ArmCtxHook( hCtxHook, ulSysFileNum);118 DevHelp_ArmCtxHook(ulSysFileNum, hCtxHook); 114 119 } 115 120 else { 116 121 DevHelp_VMFree((LIN)temp->pBuffptr); 117 122 DevHelp_VMUnLock(temp->linLock); 118 free(temp->pLock);119 123 delete temp; 120 124 }
Note:
See TracChangeset
for help on using the changeset viewer.