home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / mach / thread_special_ports.h < prev    next >
C/C++ Source or Header  |  1993-10-19  |  2KB  |  68 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:    thread_special_ports.h,v $
  12.  * Revision 2.5  89/06/27  00:25:37  rpd
  13.  *     Added thread_get_kernel_port, thread_set_kernel_port.
  14.  *     [89/06/27  00:03:21  rpd]
  15.  * 
  16.  * Revision 2.4  89/03/09  20:24:17  rpd
  17.  *     More cleanup.
  18.  * 
  19.  * Revision 2.3  89/02/25  18:41:23  gm0w
  20.  *     Changes for cleanup.
  21.  * 
  22.  * 17-Jan-88  David Golub (dbg) at Carnegie-Mellon University
  23.  *    Created.
  24.  *
  25.  */
  26. /*
  27.  *    File:    mach/thread_special_ports.h
  28.  *
  29.  *    Defines codes for special_purpose thread ports.  These are NOT
  30.  *    port identifiers - they are only used for the thread_get_special_port
  31.  *    and thread_set_special_port routines.
  32.  *    
  33.  */
  34.  
  35. #ifndef    _MACH_THREAD_SPECIAL_PORTS_H_
  36. #define _MACH_THREAD_SPECIAL_PORTS_H_
  37.  
  38. #define THREAD_KERNEL_PORT    1    /* Represents the thread to the outside
  39.                        world.*/
  40. #define THREAD_REPLY_PORT    2    /* Default reply port for the thread's
  41.                        use. */
  42. #define THREAD_EXCEPTION_PORT    3    /* Exception messages for the thread
  43.                        are sent to this port. */
  44.  
  45. /*
  46.  *    Definitions for ease of use
  47.  */
  48.  
  49. #define thread_get_kernel_port(thread, port)    \
  50.         (thread_get_special_port((thread), THREAD_KERNEL_PORT, (port)))
  51.  
  52. #define thread_set_kernel_port(thread, port)    \
  53.         (thread_set_special_port((thread), THREAD_KERNEL_PORT, (port)))
  54.  
  55. #define thread_get_reply_port(thread, port)    \
  56.         (thread_get_special_port((thread), THREAD_REPLY_PORT, (port)))
  57.  
  58. #define thread_set_reply_port(thread, port)    \
  59.         (thread_set_special_port((thread), THREAD_REPLY_PORT, (port)))
  60.  
  61. #define thread_get_exception_port(thread, port)    \
  62.         (thread_get_special_port((thread), THREAD_EXCEPTION_PORT, (port)))
  63.  
  64. #define thread_set_exception_port(thread, port)    \
  65.         (thread_set_special_port((thread), THREAD_EXCEPTION_PORT, (port)))
  66.  
  67. #endif    _MACH_THREAD_SPECIAL_PORTS_H_
  68.