]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ntsync: Introduce NTSYNC_IOC_MUTEX_KILL.
authorElizabeth Figura <zfigura@codeweavers.com>
Fri, 13 Dec 2024 19:34:48 +0000 (13:34 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2025 12:18:10 +0000 (13:18 +0100)
commitecc2ee361466e4a22e95b1c27d90f8cbd4f22e93
treefa6cf93ee6e32333300d95220422f240531ebb72
parent31ca7bb8e8539b454414a2c4f8ad643c939cb0cf
ntsync: Introduce NTSYNC_IOC_MUTEX_KILL.

This does not correspond to any NT syscall. Rather, when a thread dies, it
should be called by the NT emulator for each mutex, with the TID of the dying
thread.

NT mutexes are robust (in the pthread sense). When an NT thread dies, any
mutexes it owned are immediately released. Acquisition of those mutexes by other
threads will return a special value indicating that the mutex was abandoned,
like EOWNERDEAD returned from pthread_mutex_lock(), and EOWNERDEAD is indeed
used here for that purpose.

Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
Link: https://lore.kernel.org/r/20241213193511.457338-8-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ntsync.c
include/uapi/linux/ntsync.h