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:
parent
cb6a00c512
commit
9e3e13e410
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue