From 9e3e13e4108e953826a7c3f9286daadba04be334 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 22 Dec 2019 17:25:55 +0100 Subject: [PATCH] LibPthread: Fix typo in pthread_mutex_lock() We were casting the pthread_mutex_t* instead of pthread_mutex_t::lock to an Atomic. This still worked fine, since "lock" is the first member of pthread_mutex_t. --- Libraries/LibPthread/pthread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibPthread/pthread.cpp b/Libraries/LibPthread/pthread.cpp index 266f61a5e1..fdf5cfbcfe 100644 --- a/Libraries/LibPthread/pthread.cpp +++ b/Libraries/LibPthread/pthread.cpp @@ -114,7 +114,7 @@ int pthread_mutex_destroy(pthread_mutex_t*) int pthread_mutex_lock(pthread_mutex_t* mutex) { - auto* atomic = reinterpret_cast*>(mutex); + auto* atomic = reinterpret_cast*>(mutex->lock); pthread_t this_thread = pthread_self(); for (;;) { u32 expected = false;