diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-22 17:25:55 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-22 17:25:55 +0100 |
commit | 9e3e13e4108e953826a7c3f9286daadba04be334 (patch) | |
tree | 9ca072338d30a48b8fc06194b66027ff5244af02 /Libraries | |
parent | cb6a00c5122530815ad9837f755086394ce7b356 (diff) | |
download | serenity-9e3e13e4108e953826a7c3f9286daadba04be334.zip |
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.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibPthread/pthread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Atomic<u32>*>(mutex); + auto* atomic = reinterpret_cast<Atomic<u32>*>(mutex->lock); pthread_t this_thread = pthread_self(); for (;;) { u32 expected = false; |