Properly initialize and reset the _owner member, otherwise correlating the unlock operation with the respective read/write lock does not work. Move locking the _nbr_mutex in the unlock operation after the owner check. Otherwise, a reader holding that mutex and waiting for the write lock would deadlock a writer trying to unlock the _global_mutex. Ref. Componolit/componolit#86 Ref. #2656 Fixes #2832 |
||
---|---|---|
.. | ||
rwlock.cc | ||
semaphore.cc | ||
thread_create.cc | ||
thread.cc | ||
thread.h |