Date: Tue, 6 Aug 2019 16:54:29 +0800 From: Erich Dollansky <freebsd.ed.lists@sumeritec.com> To: freebsd-threads@freebsd.org Cc: freebsd-questions@freebsd.org Subject: mutex held in a thread which is cancelled stays busy Message-ID: <20190806165429.14bc4052.freebsd.ed.lists@sumeritec.com>
next in thread | raw e-mail | index | archive | help
Hi, 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 locked. 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? Erich
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190806165429.14bc4052.freebsd.ed.lists>