*
* sem -- semaphore tunable parameters and data structures
*

%PARAM

**********************************************************************
* The following entries form the tunable parameter table.
*

SEMA		1
SEMMAP		10		# size of semaphore set control map
SEMMNI		10		# max number of simultaneously open sema sets
SEMMNS		60		# number of semaphores in system
SEMMNU		30		# number of undo structures in system
SEMMSL		25		# max number of semaphores per set
SEMOPM		10		# max number of operations per semop system call
SEMUME		10		# max number of undo entries per undo structure
SEMVMX		32767		# max possible semaphore value
SEMAEM		16384		# max exit adjust value

%CONFIG					# code added to conf.c

#ifdef SEMA
#	ifndef IPC_ALLOC
#		include	"sys/ipc.h"
#	endif
#	include	"sys/sem.h"
	struct	semid_ds sema[SEMMNI];
	struct	sem	sem[SEMMNS];
	struct	map	semmap[SEMMAP];
	struct	sem_undo *sem_undo[NPROC];
#	define	SEMUSZ	(sizeof(struct sem_undo)+sizeof(struct undo)*SEMUME)
	int		semu[ ( ( SEMUSZ * SEMMNU ) + NBPW - 1 ) / NBPW ];
	union {
		short		semvals[SEMMSL];
		struct	semid_ds ds;
		struct	sembuf	semops[SEMOPM];
	} semtmp;

	struct	seminfo	seminfo = {
		SEMMAP, SEMMNI, SEMMNS, SEMMNU, SEMMSL,
		SEMOPM, SEMUME, SEMUSZ, SEMVMX, SEMAEM
	};
#endif

