The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/kern/syscall_emulation.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        syscall_emulation.h,v $
   29  * Revision 2.9  92/05/21  17:16:01  jfriedl
   30  *           Removed coment starter from within comments to shut up gcc warnings.
   31  *      [92/05/16            jfriedl]
   32  * 
   33  * Revision 2.8  92/03/31  15:18:00  rpd
   34  *      Removed EML_OFFSET.
   35  *      [92/03/20            rpd]
   36  * 
   37  * Revision 2.7  92/01/03  20:17:50  dbg
   38  *      Remove fixed lower bound.  Fix type declaration for
   39  *      eml_routine_t.  Remove syscall_val structure.
   40  *      [91/10/31            dbg]
   41  * 
   42  * Revision 2.6  91/06/25  10:29:22  rpd
   43  *      Fixed includes to avoid circularities.
   44  *      [91/06/24            rpd]
   45  * 
   46  * Revision 2.5  91/06/06  17:07:37  jsb
   47  *      Added emulation_vector_t for new get/set emulation vector calls.
   48  *      [91/05/24  17:47:38  jsb]
   49  * 
   50  * Revision 2.4  91/05/14  16:47:16  mrt
   51  *      Correcting copyright
   52  * 
   53  * Revision 2.3  91/02/05  17:29:30  mrt
   54  *      Changed to new Mach copyright
   55  *      [91/02/01  16:18:04  mrt]
   56  * 
   57  * Revision 2.2  90/09/09  14:32:52  rpd
   58  *      Use decl_simple_lock_data.
   59  *      [90/08/30            rpd]
   60  * 
   61  *      Allow emulation of syscalls with negative numbers.  Clobber MACH
   62  *      system calls at your own risk!
   63  *      [89/04/19            dbg]
   64  * 
   65  * Revision 2.1  89/08/03  15:54:14  rwd
   66  * Created.
   67  * 
   68  * Revision 2.2  88/08/03  15:34:07  dorr
   69  * Get rid of errno and eosys fields.  Use return value and
   70  * special return code of ERESTART to represent same information.
   71  * 
   72  * 15-Jul-88  David Golub (dbg) at Carnegie-Mellon University
   73  *      Added lock for reference count.
   74  *
   75  * 26-Jan-88  Douglas Orr (dorr) at Carnegie-Mellon University
   76  *      Added maxsyscall variable and typedefs for user space emulation library
   77  *
   78  */ 
   79 
   80 #ifndef _KERN_SYSCALL_EMULATION_H_
   81 #define _KERN_SYSCALL_EMULATION_H_
   82 
   83 #ifndef ASSEMBLER
   84 #include <mach/machine/vm_types.h>
   85 #include <kern/lock.h>
   86 
   87 typedef vm_offset_t     eml_routine_t;
   88 
   89 typedef struct eml_dispatch {
   90         decl_simple_lock_data(, lock)   /* lock for reference count */
   91         int             ref_count;      /* reference count */
   92         int             disp_count;     /* count of entries in vector */
   93         int             disp_min;       /* index of lowest entry in vector */
   94         eml_routine_t   disp_vector[1]; /* first entry in array of dispatch */
   95                                         /* routines (array has disp_count */
   96                                         /* elements) */
   97 } *eml_dispatch_t;
   98 
   99 typedef vm_offset_t     *emulation_vector_t; /* Variable-length array */
  100 
  101 #define EML_ROUTINE_NULL        (eml_routine_t)0
  102 #define EML_DISPATCH_NULL       (eml_dispatch_t)0
  103 
  104 #define EML_SUCCESS             (0)
  105 
  106 #define EML_MOD                 (err_kern|err_sub(2))
  107 #define EML_BAD_TASK            (EML_MOD|0x0001)
  108 #define EML_BAD_CNT             (EML_MOD|0x0002)
  109 #endif  ASSEMBLER
  110 
  111 #endif  _KERN_SYSCALL_EMULATION_H_

Cache object: 2fc1931e329ae9c16dc1f7938079a5b9


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.