diff options
| author | Dylan Noblesmith <nobled@dreamwidth.org> | 2014-08-23 22:49:22 +0000 |
|---|---|---|
| committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2014-08-23 22:49:22 +0000 |
| commit | 13044d1cc509cfff90ff37532353b16c676b50ca (patch) | |
| tree | 49682bf4ce953c99ec8032413c04fdb141b20d6a /llvm/lib | |
| parent | 4704ffe1641bd7d7d9366dacb179df0f222e5aa5 (diff) | |
| download | bcm5719-llvm-13044d1cc509cfff90ff37532353b16c676b50ca.tar.gz bcm5719-llvm-13044d1cc509cfff90ff37532353b16c676b50ca.zip | |
Support: make LLVM Mutexes STL-compatible
Use lock/unlock() convention instead of acquire/release().
llvm-svn: 216336
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/Support/Unix/Signals.inc | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 671bbeea8d0..e4b89c60b46 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -248,14 +248,14 @@ GenericValue Interpreter::callExternalFunction(Function *F, const std::vector<GenericValue> &ArgVals) { TheInterpreter = this; - FunctionsLock->acquire(); + FunctionsLock->lock(); // Do a lookup to see if the function is in our cache... this should just be a // deferred annotation! std::map<const Function *, ExFunc>::iterator FI = ExportedFunctions->find(F); if (ExFunc Fn = (FI == ExportedFunctions->end()) ? lookupFunction(F) : FI->second) { - FunctionsLock->release(); + FunctionsLock->unlock(); return Fn(F->getFunctionType(), ArgVals); } @@ -273,7 +273,7 @@ GenericValue Interpreter::callExternalFunction(Function *F, RawFn = RF->second; } - FunctionsLock->release(); + FunctionsLock->unlock(); GenericValue Result; if (RawFn != 0 && ffiInvoke(RawFn, F, ArgVals, getDataLayout(), Result)) diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc index 8161bfbf2a3..34c39c9ad92 100644 --- a/llvm/lib/Support/Unix/Signals.inc +++ b/llvm/lib/Support/Unix/Signals.inc @@ -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) |

