semctl.c revision 1.8
11.8Scgd/* $NetBSD: semctl.c,v 1.8 2000/06/14 17:25:07 cgd Exp $ */
21.5Sthorpej
31.3Scgd/*
41.3Scgd * Copyright (c) 1994, 1995 Christopher G. Demetriou
51.3Scgd * All rights reserved.
61.8Scgd *
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.8Scgd *          This product includes software developed for the
181.8Scgd *          NetBSD Project.  See http://www.netbsd.org/ for
191.8Scgd *          information about NetBSD.
201.3Scgd * 4. The name of the author may not be used to endorse or promote products
211.8Scgd *    derived from this software without specific prior written permission.
221.8Scgd *
231.3Scgd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
241.3Scgd * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251.3Scgd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
261.3Scgd * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
271.3Scgd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
281.3Scgd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
291.3Scgd * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
301.3Scgd * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
311.3Scgd * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
321.3Scgd * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
331.8Scgd *
341.8Scgd * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
351.3Scgd */
361.3Scgd
371.4Schristos#include <sys/cdefs.h>
381.3Scgd#if defined(LIBC_SCCS) && !defined(lint)
391.8Scgd__RCSID("$NetBSD: semctl.c,v 1.8 2000/06/14 17:25:07 cgd Exp $");
401.3Scgd#endif /* LIBC_SCCS and not lint */
411.1Scgd
421.5Sthorpej#define	__LIBC12_SOURCE__
431.5Sthorpej
441.1Scgd#include <sys/types.h>
451.1Scgd#include <sys/ipc.h>
461.1Scgd#include <sys/sem.h>
471.1Scgd
481.1Scgd#if __STDC__
491.5Sthorpejint semctl(int semid, int semnum, int cmd, union __semun semun)
501.1Scgd#else
511.6Smycroftint semctl(semid, semnum, cmd, semun)
521.1Scgd	int semid, semnum;
531.1Scgd	int cmd;
541.5Sthorpej	union __semun semun;
551.1Scgd#endif
561.1Scgd{
571.1Scgd	return (__semctl(semid, semnum, cmd, &semun));
581.1Scgd}
59