diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2023-03-27 22:07:16 -0500 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-05-23 12:24:21 +0900 |
commit | 999cebcb5df0269d24d65db579a7c78a94053c2e (patch) | |
tree | df7b916f6be7c3c5f6044a70a3cb6b572a0c1744 /examples/i18n/mywidget_tr.ts | |
parent | 4ff2cb8b3ccf77ba3e111ac37b3fe0ebb15199eb (diff) | |
download | tqt3-999cebcb5df0269d24d65db579a7c78a94053c2e.tar.gz tqt3-999cebcb5df0269d24d65db579a7c78a94053c2e.zip |
Fix level when using pthreads recursive mutex
When using the pthreads recursive mutex, the level method was only able
to return either zero or one, but a recursive mutex can be locked more
than once.
Additionally, the way this detected if the mutex was already locked was
to test whether it can be locked again. If testing from the thread that
is currently holding the lock, this locking attempt always succeeds, and
therefore determines that the lock is _not_ held at all. This is
especially bad, as this operation only makes sense to perform from the
thread that holds the lock -- if any thread not holding the lock queries
the number of times the lock is held, that answer can change before the
thread can used it.
Signed-off-by: Bobby Bingham <koorogi@koorogi.info>
Diffstat (limited to 'examples/i18n/mywidget_tr.ts')
0 files changed, 0 insertions, 0 deletions