mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibThreading: Clean up pthread mutex attributes and mutex itself
This commit is contained in:
committed by
Andrew Kaster
parent
334c55c999
commit
c19ecf33d9
@@ -27,11 +27,12 @@ public:
|
|||||||
pthread_mutexattr_init(&attr);
|
pthread_mutexattr_init(&attr);
|
||||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||||
pthread_mutex_init(&m_mutex, &attr);
|
pthread_mutex_init(&m_mutex, &attr);
|
||||||
|
pthread_mutexattr_destroy(&attr);
|
||||||
}
|
}
|
||||||
~Mutex()
|
~Mutex()
|
||||||
{
|
{
|
||||||
VERIFY(m_lock_count == 0);
|
VERIFY(m_lock_count == 0);
|
||||||
// FIXME: pthread_mutex_destroy() is not implemented.
|
pthread_mutex_destroy(&m_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lock();
|
void lock();
|
||||||
|
|||||||
Reference in New Issue
Block a user