home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / bsdss4.tz / bsdss4 / bsdss / server / i386 / pcb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-25  |  4.3 KB  |  112 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:    pcb.h,v $
  29.  * Revision 2.2  92/05/25  14:42:46  rwd
  30.  *     Added for comptability for ptrace.
  31.  *     [92/05/23            rwd]
  32.  * 
  33.  *
  34.  */
  35.  
  36. /*-
  37.  * Copyright (c) 1990 The Regents of the University of California.
  38.  * All rights reserved.
  39.  *
  40.  * This code is derived from software contributed to Berkeley by
  41.  * William Jolitz.
  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.  *    @(#)pcb.h    5.10 (Berkeley) 5/12/91
  72.  */
  73.  
  74. /*
  75.  * Intel 386 process control block
  76.  */
  77. #include "machine/tss.h"
  78. #include "machine/npx.h"
  79.  
  80. struct pcb {
  81.     struct    i386tss pcb_tss;
  82. #define    pcb_ksp    pcb_tss.tss_esp0
  83. #define    pcb_ptd    pcb_tss.tss_cr3
  84. #define    pcb_cr3    pcb_ptd
  85. #define    pcb_pc    pcb_tss.tss_eip
  86. #define    pcb_psl    pcb_tss.tss_eflags
  87. #define    pcb_usp    pcb_tss.tss_esp
  88. #define    pcb_fp    pcb_tss.tss_ebp
  89. #ifdef    notyet
  90.     u_char    pcb_iomap[NPORT/sizeof(u_char)]; /* i/o port bitmap */
  91. #endif
  92.     struct    save87    pcb_savefpu;    /* floating point state for 287/387 */
  93.     struct    emcsts    pcb_saveemc;    /* Cyrix EMC state */
  94. /*
  95.  * Software pcb (extension)
  96.  */
  97.     int    pcb_flags;
  98. #define    FP_WASUSED    0x01    /* floating point has been used in this proc */
  99. #define    FP_NEEDSSAVE    0x02    /* needs save on next context switch */
  100. #define    FP_NEEDSRESTORE    0x04    /* need restore on next DNA fault */
  101. #define    FP_USESEMC    0x08    /* process uses EMC memory-mapped mode */
  102. #define    FM_TRAP        0x10    /* process entered kernel on a trap frame */
  103.     short    pcb_iml;    /* interrupt mask level */
  104.     caddr_t    pcb_onfault;    /* copyin/out fault recovery */
  105.     long    pcb_sigc[8];    /* XXX signal code trampoline */
  106.     int    pcb_cmap2;    /* XXX temporary PTE - will prefault instead */
  107. };
  108.  
  109. #ifdef KERNEL
  110. struct pcb *curpcb;        /* our current running pcb */
  111. #endif
  112.