Annotation of OSKit-Mach/include/mach/processor_info.h, revision 1.1.1.1

1.1       root        1: /* 
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1993,1992,1991,1990,1989 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/processor_info.h
                     28:  *     Author: David L. Black
                     29:  *     Date:   1988
                     30:  *
                     31:  *     Data structure definitions for processor_info, processor_set_info
                     32:  */
                     33: 
                     34: #ifndef        _MACH_PROCESSOR_INFO_H_
                     35: #define _MACH_PROCESSOR_INFO_H_
                     36: 
                     37: #include <mach/machine.h>
                     38: 
                     39: /*
                     40:  *     Generic information structure to allow for expansion.
                     41:  */
                     42: typedef integer_t      *processor_info_t;      /* varying array of int. */
                     43: 
                     44: #define PROCESSOR_INFO_MAX     (1024)          /* max array size */
                     45: typedef integer_t      processor_info_data_t[PROCESSOR_INFO_MAX];
                     46: 
                     47: 
                     48: typedef integer_t      *processor_set_info_t;  /* varying array of int. */
                     49: 
                     50: #define PROCESSOR_SET_INFO_MAX (1024)          /* max array size */
                     51: typedef integer_t      processor_set_info_data_t[PROCESSOR_SET_INFO_MAX];
                     52: 
                     53: /*
                     54:  *     Currently defined information.
                     55:  */
                     56: #define        PROCESSOR_BASIC_INFO    1               /* basic information */
                     57: 
                     58: struct processor_basic_info {
                     59:        cpu_type_t      cpu_type;       /* type of cpu */
                     60:        cpu_subtype_t   cpu_subtype;    /* subtype of cpu */
                     61: /*boolean_t*/integer_t running;        /* is processor running */
                     62:        integer_t       slot_num;       /* slot number */
                     63: /*boolean_t*/integer_t is_master;      /* is this the master processor */
                     64: };
                     65: 
                     66: typedef        struct processor_basic_info     processor_basic_info_data_t;
                     67: typedef struct processor_basic_info    *processor_basic_info_t;
                     68: #define PROCESSOR_BASIC_INFO_COUNT \
                     69:                (sizeof(processor_basic_info_data_t)/sizeof(integer_t))
                     70: 
                     71: 
                     72: #define        PROCESSOR_SET_BASIC_INFO        1       /* basic information */
                     73: 
                     74: struct processor_set_basic_info {
                     75:        integer_t       processor_count;        /* How many processors */
                     76:        integer_t       task_count;             /* How many tasks */
                     77:        integer_t       thread_count;           /* How many threads */
                     78:        integer_t       load_average;           /* Scaled */
                     79:        integer_t       mach_factor;            /* Scaled */
                     80: };
                     81: 
                     82: /*
                     83:  *     Scaling factor for load_average, mach_factor.
                     84:  */
                     85: #define        LOAD_SCALE      1000            
                     86: 
                     87: typedef        struct processor_set_basic_info processor_set_basic_info_data_t;
                     88: typedef struct processor_set_basic_info        *processor_set_basic_info_t;
                     89: #define PROCESSOR_SET_BASIC_INFO_COUNT \
                     90:                (sizeof(processor_set_basic_info_data_t)/sizeof(integer_t))
                     91: 
                     92: #define PROCESSOR_SET_SCHED_INFO       2       /* scheduling info */
                     93: 
                     94: struct processor_set_sched_info {
                     95:        integer_t       policies;       /* allowed policies */
                     96:        integer_t       max_priority;   /* max priority for new threads */
                     97: };
                     98: 
                     99: typedef        struct processor_set_sched_info processor_set_sched_info_data_t;
                    100: typedef struct processor_set_sched_info        *processor_set_sched_info_t;
                    101: #define PROCESSOR_SET_SCHED_INFO_COUNT \
                    102:                (sizeof(processor_set_sched_info_data_t)/sizeof(integer_t))
                    103: 
                    104: #endif /* _MACH_PROCESSOR_INFO_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.