VirtualBox

Changeset 3165 in kBuild


Ignore:
Timestamp:
Mar 20, 2018 3:31:34 AM (7 years ago)
Author:
bird
Message:

kmk/win: g_RWLock no longer needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/w32/winchildren.c

    r3162 r3165  
    294294static unsigned volatile    g_idxLastChildcareWorker = 0;
    295295
     296#ifdef WITH_RW_LOCK
    296297/** RW lock for serializing kmkbuiltin_redirect and CreateProcess. */
    297298static SRWLOCK              g_RWLock;
     299#endif
    298300
    299301
     
    392394    }
    393395
     396#ifdef WITH_RW_LOCK
    394397    /*
    395398     * For serializing with standard file handle manipulation (kmkbuiltin_redirect).
    396399     */
    397400    InitializeSRWLock(&g_RWLock);
     401#endif
    398402
    399403    /*
     
    636640    DB(DB_JOBS, ("CreateProcessW(%ls, %ls,,, TRUE, %#x...)\n", pwszImageName, pwszCommandLine, fFlags));
    637641    memset(&ProcInfo, 0, sizeof(ProcInfo));
     642#ifdef WITH_RW_LOCK
    638643    AcquireSRWLockShared(&g_RWLock);
     644#endif
    639645
    640646    fRet = CreateProcessW((WCHAR *)pwszImageName, (WCHAR *)pwszCommandLine, NULL /*pProcSecAttr*/, NULL /*pThreadSecAttr*/,
     
    642648    dwErr = GetLastError();
    643649
     650#ifdef WITH_RW_LOCK
    644651    ReleaseSRWLockShared(&g_RWLock);
     652#endif
    645653    if (fRet)
    646654        pChild->u.Process.hProcess = ProcInfo.hProcess;
     
    24692477}
    24702478
    2471 #if 0  /* no longer needed */
     2479#ifdef WITH_RW_LOCK
    24722480/** Serialization with kmkbuiltin_redirect. */
    24732481void MkWinChildExclusiveAcquire(void)
     
    24812489    ReleaseSRWLockExclusive(&g_RWLock);
    24822490}
    2483 #endif
     2491#endif /* WITH_RW_LOCK */
    24842492
    24852493/**
Note: See TracChangeset for help on using the changeset viewer.

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