Elizabeth Figura dc806bd48a 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>
2024-04-11 15:34:40 +02:00

24 lines
483 B
C

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* Kernel support for NT synchronization primitive emulation
*
* Copyright (C) 2021-2022 Elizabeth Figura <zfigura@codeweavers.com>
*/
#ifndef __LINUX_NTSYNC_H
#define __LINUX_NTSYNC_H
#include <linux/types.h>
struct ntsync_sem_args {
__u32 sem;
__u32 count;
__u32 max;
};
#define NTSYNC_IOC_CREATE_SEM _IOWR('N', 0x80, struct ntsync_sem_args)
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
#endif