/	Copyright (c) 1984, 1986, 1987, 1988 AT&T
/	  All Rights Reserved

/	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
/	The copyright notice above does not evidence any
/	actual or intended publication of such source code.
	.file	"semsys.s"

	.ident	"@(#)libc-i386:libc-i386/sys/semsys.s	1.3"

#include <sys.s>

	.globl	semsys
	.globl	semctl
	.globl	semget
	.globl	semop
	.globl	_cerror
	.set	SEMCTL,0
	.set	SEMGET,1
	.set	SEMOP,2

semctl:
	MCOUNT
	popl	%eax
	pushl	$SEMCTL
	pushl	%eax
	jmp	semsys

semget:
	MCOUNT
	popl	%eax
	pushl	$SEMGET
	pushl	%eax
	jmp	semsys

semop:
	MCOUNT
	popl	%eax
	pushl	$SEMOP
	pushl	%eax

semsys:
	MCOUNT			/ subroutine entry counter if profiling
	movl	$SEMSYS,%eax
	lcall	SYSCALL
	popl	%edx
	movl	%edx,0(%esp)	/ Remove extra word
	jc	_cerror
	ret
