Changeset 291 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Jan 25, 2007 5:45:36 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
r290 r291 53 53 static RTHEAPSIMPLE g_HeapExec = NIL_RTHEAPSIMPLE; 54 54 /** Spinlock protecting the heap. */ 55 static RTSPINLOCK g_HeapExecSpinlock = NIL_RT HEAPSIMPLE;55 static RTSPINLOCK g_HeapExecSpinlock = NIL_RTSPINLOCK; 56 56 57 57 … … 84 84 RTDECL(int) RTMemExecDonate(void *pvMemory, size_t cb) 85 85 { 86 int rc; 86 87 AssertReturn(g_HeapExec == NIL_RTHEAPSIMPLE, VERR_WRONG_ORDER); 87 88 88 intrc = RTSpinlockCreate(&g_HeapExecSpinlock);89 rc = RTSpinlockCreate(&g_HeapExecSpinlock); 89 90 if (RT_SUCCESS(rc)) 90 91 { … … 115 116 if (g_HeapExec != NIL_RTHEAPSIMPLE) 116 117 { 117 fFlags |= RTMEMHDR_FLAG_EXEC_HEAP;118 118 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER; 119 119 RTSpinlockAcquireNoInts(g_HeapExecSpinlock, &SpinlockTmp); 120 120 pHdr = (PRTMEMHDR)RTHeapSimpleAlloc(g_HeapExec, cb + sizeof(*pHdr), 0); 121 121 RTSpinlockReleaseNoInts(g_HeapExecSpinlock, &SpinlockTmp); 122 fFlags |= RTMEMHDR_FLAG_EXEC_HEAP; 122 123 } 123 124 else … … 168 169 else if (pHdr->fFlags & RTMEMHDR_FLAG_EXEC_HEAP) 169 170 { 171 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER; 170 172 RTSpinlockAcquireNoInts(g_HeapExecSpinlock, &SpinlockTmp); 171 173 RTHeapSimpleFree(g_HeapExec, pHdr);
Note:
See TracChangeset
for help on using the changeset viewer.