home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / bsdss4.tz / bsdss4 / bsdss / server / sys / user.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-25  |  4.7 KB  |  133 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1992 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:    user.h,v $
  29.  * Revision 2.2  92/05/25  14:46:18  rwd
  30.  *     Added syscall tracing fields.
  31.  *     [92/05/21            rwd]
  32.  * 
  33.  * Revision 2.1  92/04/21  17:16:47  rwd
  34.  * BSDSS
  35.  * 
  36.  *
  37.  */
  38.  
  39. /*
  40.  * Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
  41.  * All rights reserved.
  42.  *
  43.  * Redistribution and use in source and binary forms, with or without
  44.  * modification, are permitted provided that the following conditions
  45.  * are met:
  46.  * 1. Redistributions of source code must retain the above copyright
  47.  *    notice, this list of conditions and the following disclaimer.
  48.  * 2. Redistributions in binary form must reproduce the above copyright
  49.  *    notice, this list of conditions and the following disclaimer in the
  50.  *    documentation and/or other materials provided with the distribution.
  51.  * 3. All advertising materials mentioning features or use of this software
  52.  *    must display the following acknowledgement:
  53.  *    This product includes software developed by the University of
  54.  *    California, Berkeley and its contributors.
  55.  * 4. Neither the name of the University nor the names of its contributors
  56.  *    may be used to endorse or promote products derived from this software
  57.  *    without specific prior written permission.
  58.  *
  59.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  60.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  61.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  62.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  63.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  64.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  65.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  66.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  67.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  68.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  69.  * SUCH DAMAGE.
  70.  *
  71.  *    @(#)user.h    7.19 (Berkeley) 5/4/91
  72.  */
  73.  
  74. #include <machine/pcb.h>
  75. #ifndef KERNEL
  76. /* stuff that *used* to be included by user.h, or is now needed */
  77. #include <errno.h>
  78. #include <sys/time.h>
  79. #include <sys/resource.h>
  80. #include <sys/ucred.h>
  81. #include <sys/uio.h>
  82. #endif
  83. #include <sys/resourcevar.h>
  84. #include <sys/signalvar.h>
  85. #include <sys/kinfo_proc.h>
  86. /*
  87.  * Per process structure containing data that isn't needed in core
  88.  * when the process isn't running (esp. when swapped out).
  89.  * This structure may or may not be at the same kernel address
  90.  * in all processes.
  91.  */
  92.  
  93. struct    user {
  94.     struct    pcb u_pcb;
  95.  
  96.     struct    sigacts u_sigacts;    /* p_sigacts points here (use it!) */
  97.     struct    pstats u_stats;        /* p_stats points here (use it!) */
  98.  
  99.     /*
  100.      * Remaining fields only for core dump and/or ptrace--
  101.      * not valid at other times!
  102.      */
  103.     struct    kinfo_proc u_kproc;    /* proc + eproc */
  104.     /* Support for syscall tracing, can't these be in eproc? */
  105.     int    u_scno;            /* syscall number */
  106.     int    u_arg[8];        /* syscall arguments */
  107.     int    u_rval[2];        /* syscall return values */
  108. #define u_rval1 u_rval[0]        /* compatibility mode */
  109. #define u_rval2 u_rval[1]
  110.     int    u_error;        /* syscall error */
  111. };
  112.  
  113. /*
  114.  * Redefinitions to make the debuggers happy for now...
  115.  * This subterfuge brought to you by coredump() and procxmt().
  116.  * These fields are *only* valid at those times!
  117.  */
  118. #define    U_ar0    u_kproc.kp_proc.p_regs    /* copy of curproc->p_regs */
  119. #define    U_tsize    u_kproc.kp_eproc.e_vm.vm_tsize
  120. #define    U_dsize    u_kproc.kp_eproc.e_vm.vm_dsize
  121. #define    U_ssize    u_kproc.kp_eproc.e_vm.vm_ssize
  122. #define    U_sig    u_sigacts.ps_sig
  123. #define    U_code    u_sigacts.ps_code
  124.  
  125. #ifndef KERNEL
  126. #define    u_ar0    U_ar0
  127. #define    u_tsize    U_tsize
  128. #define    u_dsize    U_dsize
  129. #define    u_ssize    U_ssize
  130. #define    u_sig    U_sig
  131. #define    u_code    U_code
  132. #endif /* KERNEL */
  133.