semctl.c revision 1.5
11.5Sthorpej/*	$NetBSD: semctl.c,v 1.5 1999/08/25 05:09:32 thorpej Exp $	*/
21.5Sthorpej
31.3Scgd/*
41.3Scgd * Copyright (c) 1994, 1995 Christopher G. Demetriou
51.3Scgd * All rights reserved.
61.3Scgd *
71.3Scgd * Redistribution and use in source and binary forms, with or without
81.3Scgd * modification, are permitted provided that the following conditions
91.3Scgd * are met:
101.3Scgd * 1. Redistributions of source code must retain the above copyright
111.3Scgd *    notice, this list of conditions and the following disclaimer.
121.3Scgd * 2. Redistributions in binary form must reproduce the above copyright
131.3Scgd *    notice, this list of conditions and the following disclaimer in the
141.3Scgd *    documentation and/or other materials provided with the distribution.
151.3Scgd * 3. All advertising materials mentioning features or use of this software
161.3Scgd *    must display the following acknowledgement:
171.3Scgd *	This product includes software developed by Christopher G. Demetriou
181.3Scgd *	for the NetBSD Project.
191.3Scgd * 4. The name of the author may not be used to endorse or promote products
201.3Scgd *    derived from this software without specific prior written permission
211.3Scgd *
221.3Scgd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
231.3Scgd * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
241.3Scgd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
251.3Scgd * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
261.3Scgd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
271.3Scgd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
281.3Scgd * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
291.3Scgd * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
301.3Scgd * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
311.3Scgd * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
321.3Scgd */
331.3Scgd
341.4Schristos#include <sys/cdefs.h>
351.3Scgd#if defined(LIBC_SCCS) && !defined(lint)
361.5Sthorpej__RCSID("$NetBSD: semctl.c,v 1.5 1999/08/25 05:09:32 thorpej Exp $");
371.3Scgd#endif /* LIBC_SCCS and not lint */
381.1Scgd
391.5Sthorpej#define	__LIBC12_SOURCE__
401.5Sthorpej
411.1Scgd#include <sys/types.h>
421.1Scgd#include <sys/ipc.h>
431.1Scgd#include <sys/sem.h>
441.1Scgd
451.1Scgd#if __STDC__
461.5Sthorpejint semctl(int semid, int semnum, int cmd, union __semun semun)
471.1Scgd#else
481.1Scgdint semctl(semid, int semnum, cmd, semun)
491.1Scgd	int semid, semnum;
501.1Scgd	int cmd;
511.5Sthorpej	union __semun semun;
521.1Scgd#endif
531.1Scgd{
541.1Scgd	return (__semctl(semid, semnum, cmd, &semun));
551.1Scgd}
56