mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 20:10:50 +08: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:
@@ -466,8 +466,8 @@ StackFrameList::InvalidateFrames (uint32_t start_idx)
|
||||
void
|
||||
StackFrameList::Merge (std::auto_ptr<StackFrameList>& curr_ap, lldb::StackFrameListSP& prev_sp)
|
||||
{
|
||||
Mutex::Locker curr_locker (curr_ap.get() ? curr_ap->m_mutex.GetMutex() : NULL);
|
||||
Mutex::Locker prev_locker (prev_sp.get() ? prev_sp->m_mutex.GetMutex() : NULL);
|
||||
Mutex::Locker curr_locker (curr_ap.get() ? &curr_ap->m_mutex : NULL);
|
||||
Mutex::Locker prev_locker (prev_sp.get() ? &prev_sp->m_mutex : NULL);
|
||||
|
||||
#if defined (DEBUG_STACK_FRAMES)
|
||||
StreamFile s(stdout, false);
|
||||
|
||||
Reference in New Issue
Block a user