mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibThreading: Clean up pthread mutex attributes and mutex itself
This commit is contained in:
parent
334c55c999
commit
c19ecf33d9
Notes:
github-actions[bot]
2025-02-20 22:06:26 +00:00
Author: https://github.com/ADKaster
Commit: c19ecf33d9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3642
Reviewed-by: https://github.com/alimpfard ✅
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue