Support: make LLVM Mutexes STL-compatible

Use lock/unlock() convention instead of acquire/release().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216336 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dylan Noblesmith
2014-08-23 22:49:22 +00:00
parent 7e3e4311c5
commit d930a30833
7 changed files with 42 additions and 40 deletions

View File

@ -162,24 +162,24 @@ static RETSIGTYPE SignalHandler(int Sig) {
sigfillset(&SigMask);
sigprocmask(SIG_UNBLOCK, &SigMask, nullptr);
SignalsMutex.acquire();
SignalsMutex.lock();
RemoveFilesToRemove();
if (std::find(IntSigs, IntSigsEnd, Sig) != IntSigsEnd) {
if (InterruptFunction) {
void (*IF)() = InterruptFunction;
SignalsMutex.release();
SignalsMutex.unlock();
InterruptFunction = nullptr;
IF(); // run the interrupt function.
return;
}
SignalsMutex.release();
SignalsMutex.unlock();
raise(Sig); // Execute the default handler.
return;
}
SignalsMutex.release();
SignalsMutex.unlock();
// Otherwise if it is a fault (like SEGV) run any handler.
for (unsigned i = 0, e = CallBacksToRun.size(); i != e; ++i)