home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / mach / port.h < prev    next >
Text File  |  1992-07-29  |  4KB  |  114 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * Copyright (c) 1988 Carnegie-Mellon University
  5.  * Copyright (c) 1987 Carnegie-Mellon University
  6.  * All rights reserved.  The CMU software License Agreement specifies
  7.  * the terms and conditions for use and redistribution.
  8.  */
  9. /*
  10.  * HISTORY
  11.  * $Log:    port.h,v $
  12.  *  7-Aug-90  Gregg Kellogg (gk) at NeXT
  13.  *    Moved PORT_BACKLOG_DEFAULT and PORT_BACKLOG_MAX from kern/mach_param.h to sys/port.h
  14.  *
  15.  *  4-Mar-90  Gregg Kellogg (gk) at NeXT
  16.  *    Go ahead and define PORT_TYPE_RECEIVE if not MACH_IPC_XXXHACH
  17.  *    for NeXT.  It will work the same as PORT_TYPE_ALL in this case.
  18.  *
  19.  * Revision 2.10  89/03/09  20:22:30  rpd
  20.  *     More cleanup.
  21.  * 
  22.  * Revision 2.9  89/03/05  16:49:06  rpd
  23.  *     Moved ownership rights under MACH_IPC_XXXHACK.
  24.  *     [89/02/16            rpd]
  25.  * 
  26.  * Revision 2.8  89/02/25  18:39:37  gm0w
  27.  *     Changes for cleanup.
  28.  * 
  29.  * Revision 2.7  89/02/07  00:52:59  mwyoung
  30.  * Relocated from sys/port.h
  31.  * 
  32.  * Revision 2.6  89/01/10  23:32:30  rpd
  33.  *     Only define PORT_ENABLED when MACH_IPC_XXXHACK is turned on.
  34.  *     [89/01/10  23:10:59  rpd]
  35.  * 
  36.  * Revision 2.5  88/09/25  22:16:30  rpd
  37.  *     Removed PORT_INVALID.  Cast PORT_NULL as port_name_t and!2"    PORT_ENABLED as port_set_name_t.
  38.  *     [88/09/24  18:11:43  rpd]
  39.  * 
  40.  * Revision 2.4  88/07/29  03:21:36  rpd
  41.  * When non-KERNEL, don't define PORT_ILLEGAL and define PORT_ENABLED as
  42.  * a global port-set variable.  Compatibility code in libmach will implement
  43.  * port_enable/port_disable using a PORT_ENABLED variable.
  44.  * 
  45.  * Revision 2.3  88/07/20  21:06:54  rpd
  46.  * Added port_set_name_t, port_name_array_t, port_type_t, port_type_array_t.
  47.  * Added PORT_TYPE_* definitions.
  48.  * Add port_name_t type.
  49.  * 
  50.  * Revision 2.2  88/07/17  18:53:32  mwyoung
  51.  * .
  52.  * 
  53.  * Revision 2.1.2.1  88/06/28  20:51:47  mwyoung
  54.  * Pick up rpd's changes.
  55.  * 
  56.  * Revision 2.1.1.1  88/06/23  23:30:39  rpd
  57.  * Add port_name_t type.
  58.  * 
  59.  * 10-Nov-86  Michael Young (mwyoung) at Carnegie-Mellon University
  60.  *    Added PORT_INVALID and some more documentation.
  61.  *
  62.  * 28-Oct-86  Michael Young (mwyoung) at Carnegie-Mellon University
  63.  *    Added port_*_t types; not all are used by the
  64.  *    kernel, but names are exported for consistency.
  65.  *
  66.  * 21-Oct-86  Michael Young (mwyoung) at Carnegie-Mellon University
  67.  *    Added port_rcv_t type; used by the interface generator.
  68.  *
  69.  * 19-Jul-86  Michael Young (mwyoung) at Carnegie-Mellon University
  70.  *    Documentation change only.
  71.  *
  72.  * 26-Jun-86  Michael Young (mwyoung) at Carnegie-Mellon University
  73.  *    Added PORT_ENABLED to refer to any enabled port.
  74.  *
  75.  *  8-May-86  Michael Young (mwyoung) at Carnegie-Mellon University
  76.  *    Created
  77.  *
  78.  */
  79. /*
  80.  *    File:    mach/port.h
  81.  *
  82.  *    Definition of a port
  83.  *
  84.  *    [The basic port_t type should probably be machine-dependent,
  85.  *    as it must be represented by a 32-bit integer.]
  86.  */
  87.  
  88. #ifndef    _MACH_PORT_H_
  89. #define _MACH_PORT_H_
  90.  
  91. typedef int         port_name_t;        /* A capability's name */
  92. typedef port_name_t    port_set_name_t;    /* Descriptive alias */
  93. typedef port_name_t    *port_name_array_t;
  94.  
  95. typedef int        port_type_t;        /* What kind of capability? */
  96. typedef port_type_t    *port_type_array_t;
  97.  
  98.     /* Values for port_type_t */
  99.  
  100. #define PORT_TYPE_NONE        0        /* No rights */
  101. #define PORT_TYPE_SEND        1        /* Send rights */
  102. #define PORT_TYPE_RECEIVE_OWN    7        /* Send, receive, ownership */
  103. #define PORT_TYPE_SET        9        /* Set ownership */
  104. #define PORT_TYPE_LAST        10        /* Last assigned */
  105.  
  106. typedef    port_name_t    port_t;            /* Port with send rights */
  107. typedef    port_t        port_all_t;        /* Port with receive and ownership */
  108. typedef    port_t        *port_array_!2##define PORT_NULL    ((port_name_t) 0)    /* Used to denote no port; legal value */
  109.  
  110. #define PORT_BACKLOG_DEFAULT    5
  111. #define PORT_BACKLOG_MAX    16
  112.  
  113. #endif    _MACH_PORT_H_
  114.