|
|
1.1 ! root 1: /* ! 2: * Mach Operating System ! 3: * Copyright (c) 1993,1992,1991,1990,1989,1988 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 [email protected] ! 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: * File: mach/host_info.h ! 28: * ! 29: * Definitions for host_info call. ! 30: */ ! 31: ! 32: #ifndef _MACH_HOST_INFO_H_ ! 33: #define _MACH_HOST_INFO_H_ ! 34: ! 35: #include <mach/machine.h> ! 36: #include <mach/machine/vm_types.h> ! 37: ! 38: /* ! 39: * Generic information structure to allow for expansion. ! 40: */ ! 41: typedef integer_t *host_info_t; /* varying array of integers */ ! 42: ! 43: #define HOST_INFO_MAX (1024) /* max array size */ ! 44: typedef integer_t host_info_data_t[HOST_INFO_MAX]; ! 45: ! 46: #define KERNEL_VERSION_MAX (512) ! 47: typedef char kernel_version_t[KERNEL_VERSION_MAX]; ! 48: ! 49: #define KERNEL_BOOT_INFO_MAX (4096) ! 50: typedef char kernel_boot_info_t[KERNEL_BOOT_INFO_MAX]; ! 51: ! 52: /* ! 53: * Currently defined information. ! 54: */ ! 55: #define HOST_BASIC_INFO 1 /* basic info */ ! 56: #define HOST_PROCESSOR_SLOTS 2 /* processor slot numbers */ ! 57: #define HOST_SCHED_INFO 3 /* scheduling info */ ! 58: #define HOST_LOAD_INFO 4 /* avenrun/mach_factor info */ ! 59: ! 60: struct host_basic_info { ! 61: integer_t max_cpus; /* max number of cpus possible */ ! 62: integer_t avail_cpus; /* number of cpus now available */ ! 63: vm_size_t memory_size; /* size of memory in bytes */ ! 64: cpu_type_t cpu_type; /* cpu type */ ! 65: cpu_subtype_t cpu_subtype; /* cpu subtype */ ! 66: }; ! 67: ! 68: typedef struct host_basic_info host_basic_info_data_t; ! 69: typedef struct host_basic_info *host_basic_info_t; ! 70: #define HOST_BASIC_INFO_COUNT \ ! 71: (sizeof(host_basic_info_data_t)/sizeof(integer_t)) ! 72: ! 73: struct host_sched_info { ! 74: integer_t min_timeout; /* minimum timeout in milliseconds */ ! 75: integer_t min_quantum; /* minimum quantum in milliseconds */ ! 76: }; ! 77: ! 78: typedef struct host_sched_info host_sched_info_data_t; ! 79: typedef struct host_sched_info *host_sched_info_t; ! 80: #define HOST_SCHED_INFO_COUNT \ ! 81: (sizeof(host_sched_info_data_t)/sizeof(integer_t)) ! 82: ! 83: struct host_load_info { ! 84: integer_t avenrun[3]; /* scaled by LOAD_SCALE */ ! 85: integer_t mach_factor[3]; /* scaled by LOAD_SCALE */ ! 86: }; ! 87: ! 88: typedef struct host_load_info host_load_info_data_t; ! 89: typedef struct host_load_info *host_load_info_t; ! 90: #define HOST_LOAD_INFO_COUNT \ ! 91: (sizeof(host_load_info_data_t)/sizeof(integer_t)) ! 92: ! 93: #endif /* _MACH_HOST_INFO_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.