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

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * Copyright (c) 1988 Carnegie-Mellon University
  5.  * All rights reserved.  The CMU software License Agreement specifies
  6.  * the terms and conditions for use and redistribution.
  7.  */
  8. /*
  9.  * HISTORY
  10.  * $Log:    host_info.h,v $
  11.  * Revision 2.4  89/10/15  02:05:31  rpd
  12.  *     Minor cleanups.
  13.  * 
  14.  * Revision 2.2  89!1t11  14:36:55  dlb
  15.  *     Add sched_info flavor to return minimum times for use by
  16.  *     external schedulers.
  17.  *     [89/06/08            dlb]
  18.  * 
  19.  *     Added kernel_version type definitions.
  20.  *     [88/12/02            dlb]
  21.  * 
  22.  * Revision 2.1.1.3  89/08/02  23:07:57  dlb
  23.  *     Cleanup changes.
  24.  *     [89/08/02            dlb]
  25.  * 
  26.  * Revision 2.1.1.2  89/07/25  18:45:09  dlb
  27.  *     Add sched_info flavor to return minimum times for use by
  28.  *     external schedulers.
  29.  *     [89/06/08            dlb]
  30.  * 
  31.  * Revision 2.1.1.1  89/01/30  22:42:52  dlb
  32.  *     Added kernel_version type definitions.
  33.  *     [88/12/02            dlb]
  34.  * 
  35.  * 30-Nov-88  David Black (dlb) at Carnegie-Mellon University
  36.  *    Created.  2 flavors so far: basic info,  slot numbers.
  37.  *
  38.  */
  39.  
  40. /*
  41.  *    File:    mach/host_info.h
  42.  *
  43.  *    Definitions for host_info call.
  44.  */
  45.  
  46. #ifndef    _MACH_HOST_INFO_H_
  47. #define    _MACH_HOST_INFO_H_
  48.  
  49. #import <mach/machine.h>
  50. #import <mach/machine/vm_types.h>
  51.  
  52. /*
  53.  *    Generic information structure to allow for expansion.
  54.  */
  55. typedef int    *host_info_t;        /* varying array of int. */
  56.  
  57. #define    HOST_INFO_MAX    (1024)        /* max array size */
  58. typedef int    host_info_data_t[HOST_INFO_MAX];
  59.  
  60. #define KERNEL_VERSION_MAX (512)
  61. typedef char    kernel_version_t[KERNEL_VERSION_MAX];
  62. /*
  63.  *    Currently defined information.
  64.  */
  65. #define HOST_BASIC_INFO        1    /* basic info */
  66. #define HOST_PROCESSOR_SLOTS    2    /* processor slot numbers */
  67. #define HOST_SCHED_INFO        3    /* scheduling info */
  68.  
  69. struct host_basic_info {
  70.     int        max_cpus;    /* max number of cpus possible */
  71.     int        avail_cpus;    /* number of cpus now available */
  72.     vm_size_t    memory_size;    /* size of memory in bytes */
  73.     cpu_type_t    cpu_type;    /* cpu type */
  74.     cpu_subtype_t    cpu_subtype;    /* cpu subtype */
  75. };
  76.  
  77. typedef    struct host_basic_info    host_basic_info_data_t;
  78. typedef struct host_basic_info    *host_basic_info_t;
  79. #define HOST_BASIC_INFO_COUNT \
  80.         (sizeof(host_basic_info_data_t)/sizeof(int))
  81.  
  82. struct host_sched_info {
  83.     int        min_timeout;    /* minimum timeout in milliseconds */
  84.     int        min_quantum;    /* minimum quantum in milliseconds */
  85. };
  86.  
  87. typedef    struct host_sched_info    host_sched_info_data_t;
  88. typedef struct host_sched_info    *host_sched_info_t;
  89. #define HOST_SCHED_INFO_COUNT \
  90.         (sizeof(host_sched_info_data_t)/sizeof(int))
  91.  
  92. #endif    _MACH_HOST_INFO_H_
  93.