home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / vm / faultcode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.0 KB  |  62 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. /*
  11.  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  12.  *         PROPRIETARY NOTICE (Combined)
  13.  * 
  14.  * This source code is unpublished proprietary information
  15.  * constituting, or derived under license from AT&T's UNIX(r) System V.
  16.  * In addition, portions of such source code were derived from Berkeley
  17.  * 4.3 BSD under license from the Regents of the University of
  18.  * California.
  19.  * 
  20.  * 
  21.  * 
  22.  *         Copyright Notice 
  23.  * 
  24.  * Notice of copyright on this source code product does not indicate 
  25.  * publication.
  26.  * 
  27.  *     (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  28.  *     (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  29.  *               All rights reserved.
  30.  *  
  31.  */
  32.  
  33. #ifndef _VM_FAULTCODE_H
  34. #define _VM_FAULTCODE_H
  35.  
  36. #ident    "@(#)/usr/include/vm/faultcode.h.sl 1.1 4.0 12/08/90 612 AT&T-USL"
  37.  
  38. /*
  39.  * This file describes the "code" that is delivered during
  40.  * SIGBUS and SIGSEGV exceptions.  It also describes the data
  41.  * type returned by vm routines which handle faults.
  42.  *
  43.  * If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
  44.  * returned by the underlying object mapped at the fault address.
  45.  */
  46. #define    FC_HWERR    0x1    /* misc hardware error (e.g. bus timeout) */
  47. #define    FC_ALIGN    0x2    /* hardware alignment error */
  48. #define    FC_NOMAP    0x3    /* no mapping at the fault address */
  49. #define    FC_PROT        0x4    /* access exceeded current protections */
  50. #define    FC_OBJERR    0x5    /* underlying object returned errno value */
  51.  
  52. #define    FC_MAKE_ERR(e)    (((e) << 8) | FC_OBJERR)
  53.  
  54. #define    FC_CODE(fc)    ((fc) & 0xff)
  55. #define    FC_ERRNO(fc)    ((unsigned)(fc) >> 8)
  56.  
  57. #ifndef LOCORE
  58. typedef    int    faultcode_t;    /* type returned by vm fault routines */
  59. #endif /* LOCORE */
  60.  
  61. #endif    /* _VM_FAULTCODE_H */
  62.