Skip to content
Commit 0df7bd26 authored by Jaxson Han's avatar Jaxson Han Committed by Carles Cufí
Browse files

lib: posix: pthread_rwlock: Fix a racy issue



Multiple reader threads unlocking the read lock simultaneously might
cause the program hang because it's possible that no thread is
identified as the last one to active the writer thread.

To fix the issue, swap the k_sem_give sequence.

Signed-off-by: default avatarJaxson Han <jaxson.han@arm.com>
parent 8fd1ce75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment