mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes.
No one was using it and Locker(pthread_mutex_t *) immediately asserts for pthread_mutex_t's that don't come from a Mutex anyway. Rather than try to make that work, we should maintain the Mutex abstraction and not pass around the platform implementation... Make Mutex::Locker::Lock take a Mutex & or a Mutex *, and remove the constructor taking a pthread_mutex_t *. You no longer need to call Mutex::GetMutex to pass your mutex to a Locker (you can't in fact, since I made it private.) llvm-svn: 156221
This commit is contained in:
1 parent
e326ed33a8
commit
10ebffa48a
17 files changed
+74
-72
No files matched your search
@@ -130,7 +130,7 @@ SBFunction::GetInstructions (SBTarget target)
|
||||
TargetSP target_sp (target.GetSP());
|
||||
if (target_sp)
|
||||
{
|
||||
api_locker.Lock (target_sp->GetAPIMutex().GetMutex());
|
||||
api_locker.Lock (target_sp->GetAPIMutex());
|
||||
target_sp->CalculateExecutionContext (exe_ctx);
|
||||
exe_ctx.SetProcessSP(target_sp->GetProcessSP());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user