mutex held in a thread which is cancelled stays busy
freebsd.ed.lists at sumeritec.com
Tue Aug 6 08:55:30 UTC 2019
for testing purpose, I did the following.
Start a thread, initialise a mutex in a global variable, lock the mutex
and wait in that thread.
Wait in the main program until above's thread waits and cancel it.
Clean up behind the cancelled thread but leave intentional the mutex
I would have expected now to get an error like 'EOWNERDEAD' doing
operations with that mutex. But I get 'EBUSY' as the error.
Of course, the program is not able to do any thing with that mutex.
Where is the misunderstanding?
More information about the freebsd-questions