sysent.h revision 14917
18876Srgrimes/*- 24Srgrimes * Copyright (c) 1982, 1988, 1991 The Regents of the University of California. 34Srgrimes * All rights reserved. 44Srgrimes * 58876Srgrimes * Redistribution and use in source and binary forms, with or without 64Srgrimes * modification, are permitted provided that the following conditions 74Srgrimes * are met: 84Srgrimes * 1. Redistributions of source code must retain the above copyright 94Srgrimes * notice, this list of conditions and the following disclaimer. 104Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 118876Srgrimes * notice, this list of conditions and the following disclaimer in the 128876Srgrimes * documentation and/or other materials provided with the distribution. 134Srgrimes * 3. All advertising materials mentioning features or use of this software 144Srgrimes * must display the following acknowledgement: 158876Srgrimes * This product includes software developed by the University of 164Srgrimes * California, Berkeley and its contributors. 178876Srgrimes * 4. Neither the name of the University nor the names of its contributors 184Srgrimes * may be used to endorse or promote products derived from this software 194Srgrimes * without specific prior written permission. 204Srgrimes * 214Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 228876Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 234Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 244Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 254Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 268876Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 274Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28623Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 294Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 304Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 314Srgrimes * SUCH DAMAGE. 324Srgrimes * 334Srgrimes * $Id: sysent.h,v 1.7 1996/03/02 19:38:20 peter Exp $ 344Srgrimes */ 354Srgrimes 362056Swollman#ifndef _SYS_SYSENT_H_ 372056Swollman#define _SYS_SYSENT_H_ 382056Swollman 392056Swollmantypedef int sy_call_t __P((struct proc *, void *, int *)); 404Srgrimes 414Srgrimesstruct sysent { /* system call table */ 424Srgrimes int sy_narg; /* number of arguments */ 434Srgrimes sy_call_t *sy_call; /* implementing function */ 444Srgrimes}; 454Srgrimes 464Srgrimesstruct image_params; 474Srgrimesstruct trapframe; 484Srgrimes 494Srgrimesstruct sysentvec { 504Srgrimes int sv_size; /* number of entries */ 514Srgrimes struct sysent *sv_table; /* pointer to sysent */ 524Srgrimes u_int sv_mask; /* optional mask to index */ 534Srgrimes int sv_sigsize; /* size of signal translation table */ 544Srgrimes int *sv_sigtbl; /* signal translation table */ 554Srgrimes int sv_errsize; /* size of signal translation table */ 564Srgrimes int *sv_errtbl; /* errno translation table */ 574Srgrimes int (*sv_fixup) __P((int **, struct image_params *)); 584Srgrimes /* stack fixup function */ 594Srgrimes void (*sv_sendsig) __P((sig_t, int, int, u_long)); 604Srgrimes /* send signal */ 614Srgrimes char *sv_sigcode; /* start of sigtramp code */ 624Srgrimes int *sv_szsigcode; /* size of sigtramp code */ 634Srgrimes void (*sv_prepsyscall) __P((struct trapframe *, int *, 644Srgrimes u_int *, caddr_t *)); 654Srgrimes}; 664Srgrimes 674Srgrimes#ifdef KERNEL 684Srgrimesextern struct sysentvec aout_sysvec; 694Srgrimesextern struct sysent sysent[]; 704Srgrimes#endif 714Srgrimes 724Srgrimes#endif /* !_SYS_SYSENT_H_ */ 734Srgrimes