VirtualBox

Changeset 291 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Jan 25, 2007 5:45:36 AM (18 years ago)
Author:
vboxsync
Message:

compile fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c

    r290 r291  
    5353static RTHEAPSIMPLE g_HeapExec = NIL_RTHEAPSIMPLE;
    5454/** Spinlock protecting the heap. */
    55 static RTSPINLOCK   g_HeapExecSpinlock = NIL_RTHEAPSIMPLE;
     55static RTSPINLOCK   g_HeapExecSpinlock = NIL_RTSPINLOCK;
    5656
    5757
     
    8484RTDECL(int) RTMemExecDonate(void *pvMemory, size_t cb)
    8585{
     86    int rc;
    8687    AssertReturn(g_HeapExec == NIL_RTHEAPSIMPLE, VERR_WRONG_ORDER);
    8788
    88     int rc = RTSpinlockCreate(&g_HeapExecSpinlock);
     89    rc = RTSpinlockCreate(&g_HeapExecSpinlock);
    8990    if (RT_SUCCESS(rc))
    9091    {
     
    115116        if (g_HeapExec != NIL_RTHEAPSIMPLE)
    116117        {
    117             fFlags |= RTMEMHDR_FLAG_EXEC_HEAP;
    118118            RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER;
    119119            RTSpinlockAcquireNoInts(g_HeapExecSpinlock, &SpinlockTmp);
    120120            pHdr = (PRTMEMHDR)RTHeapSimpleAlloc(g_HeapExec, cb + sizeof(*pHdr), 0);
    121121            RTSpinlockReleaseNoInts(g_HeapExecSpinlock, &SpinlockTmp);
     122            fFlags |= RTMEMHDR_FLAG_EXEC_HEAP;
    122123        }
    123124        else
     
    168169    else if (pHdr->fFlags & RTMEMHDR_FLAG_EXEC_HEAP)
    169170    {
     171        RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER;
    170172        RTSpinlockAcquireNoInts(g_HeapExecSpinlock, &SpinlockTmp);
    171173        RTHeapSimpleFree(g_HeapExec, pHdr);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette