Blame include/ntapi/nt_sem.h

4a2e49
#ifndef _NT_SEM_H_
4a2e49
#define _NT_SEM_H_
4a2e49
4a2e49
#include "nt_abi.h"
4a2e49
#include "nt_object.h"
4a2e49
4a2e49
/* semaphore commands */
4a2e49
#define NT_SEM_CMD_GETPID		(11)
4a2e49
#define NT_SEM_CMD_GETVAL		(12)
4a2e49
#define NT_SEM_CMD_GETALL		(13)
4a2e49
#define NT_SEM_CMD_GETNCNT		(14)
4a2e49
#define NT_SEM_CMD_GETZCNT		(15)
4a2e49
#define NT_SEM_CMD_SETVAL		(16)
4a2e49
#define NT_SEM_CMD_SETALL		(17)
4a2e49
4a2e49
4a2e49
/* semaphore command flags */
4a2e49
#define NT_SEM_FLAG_NOWAIT		(0x0800)
4a2e49
#define NT_SEM_FLAG_UNDO		(0x1000)
4a2e49
4a2e49
4a2e49
/* semaphore info */
4a2e49
typedef struct __attr_ptr_size_aligned__ _nt_sem_info {
4a2e49
	void *		hport;
4a2e49
	void *		hprocess;
4a2e49
	void *		hthread;
4a2e49
	void *		section;
4a2e49
	void *		section_addr;
4a2e49
	size_t		section_size;
4a2e49
	void *		apc_routine;
4a2e49
	void *		apc_context;
4a2e49
	int32_t		semkey;
4a2e49
	int32_t		semslots;
4a2e49
	int32_t		semid;
4a2e49
	int32_t		semnum;
4a2e49
	int32_t		semcmd;
4a2e49
	int32_t		sempid;
4a2e49
	int32_t		semncnt;
4a2e49
	int32_t		semzcnt;
4a2e49
	int32_t		semval;
4a2e49
	int32_t		semadj;
4a2e49
	nt_filetime	semotime;
4a2e49
	nt_filetime	semctime;
4a2e49
	uint32_t	ipcuid;
4a2e49
	uint32_t	ipcgid;
4a2e49
	uint32_t	ipccuid;
4a2e49
	uint32_t	ipccgid;
4a2e49
	uint32_t	ipcmode;
4a2e49
	int32_t		ipcseq;
4a2e49
	uint32_t	ntaccess;
4a2e49
	uint32_t	ntattr;
4a2e49
	uint32_t	ntshare;
4a2e49
	uint32_t	ntoptions;
4a2e49
	nt_iosb *	riosb;
4a2e49
	void *		hevent[2];
4a2e49
} nt_sem_info;
4a2e49
4a2e49
4a2e49
/* semaphore operation */
4a2e49
typedef struct _nt_sem_op {
4a2e49
        uint16_t	semnum;
4a2e49
        int16_t		semop;
4a2e49
        int16_t		semflag;
4a2e49
} nt_sem_op;
4a2e49
4a2e49
#endif