LibThreading: Clean up pthread mutex attributes and mutex itself

This commit is contained in:
Andrew Kaster 2025-02-20 04:15:39 -07:00 committed by Andrew Kaster
parent 334c55c999
commit c19ecf33d9
Notes: github-actions[bot] 2025-02-20 22:06:26 +00:00

View file

@ -27,11 +27,12 @@ public:
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&m_mutex, &attr);
pthread_mutexattr_destroy(&attr);
}
~Mutex()
{
VERIFY(m_lock_count == 0);
// FIXME: pthread_mutex_destroy() is not implemented.
pthread_mutex_destroy(&m_mutex);
}
void lock();