mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-19 19:15:19 +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: https://github.com/LadybirdBrowser/ladybird/commit/c19ecf33d97 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_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();
|
||||
|
|
Loading…
Add table
Reference in a new issue