ntsync: Introduce NTSYNC_IOC_SEM_POST.
authorElizabeth Figura <zfigura@codeweavers.com>
Fri, 29 Mar 2024 00:05:54 +0000 (19:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2024 13:34:40 +0000 (15:34 +0200)
commitdc806bd48abc1b8a4ae72709a37e65db42a32048
treeb97968122adb50ba7d96a9e02a07c9556035245c
parentb46271ec40a05580d55f917c9ac52cb93553160a
ntsync: Introduce NTSYNC_IOC_SEM_POST.

This corresponds to the NT syscall NtReleaseSemaphore().

This increases the semaphore's internal counter by the given value, and returns
the previous value. If the counter would overflow the defined maximum, the
function instead fails and returns -EOVERFLOW.

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