1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 06:27:35 +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:
Andreas Kling 2019-12-22 17:25:55 +01:00
parent cb6a00c512
commit 9e3e13e410

View file

@ -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;