mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibPthread: Fix typo in pthread_mutex_lock()
We were casting the pthread_mutex_t* instead of pthread_mutex_t::lock to an Atomic<u32>. This still worked fine, since "lock" is the first member of pthread_mutex_t.
This commit is contained in:
@@ -114,7 +114,7 @@ int pthread_mutex_destroy(pthread_mutex_t*)
|
||||
|
||||
int pthread_mutex_lock(pthread_mutex_t* mutex)
|
||||
{
|
||||
auto* atomic = reinterpret_cast<Atomic<u32>*>(mutex);
|
||||
auto* atomic = reinterpret_cast<Atomic<u32>*>(mutex->lock);
|
||||
pthread_t this_thread = pthread_self();
|
||||
for (;;) {
|
||||
u32 expected = false;
|
||||
|
||||
Reference in New Issue
Block a user