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

1.1       root        1: /* 
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1993-1987 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:  *     Machine-independent task information structures and definitions.
                     28:  *
                     29:  *     The definitions in this file are exported to the user.  The kernel
                     30:  *     will translate its internal data structures to these structures
                     31:  *     as appropriate.
                     32:  *
                     33:  */
                     34: 
                     35: #ifndef        _MACH_TASK_INFO_H_
                     36: #define        _MACH_TASK_INFO_H_
                     37: 
                     38: #include <mach/machine/vm_types.h>
                     39: #include <mach/time_value.h>
                     40: 
                     41: /*
                     42:  *     Generic information structure to allow for expansion.
                     43:  */
                     44: typedef        integer_t       *task_info_t;           /* varying array of int */
                     45: 
                     46: #define        TASK_INFO_MAX   (1024)          /* maximum array size */
                     47: typedef        integer_t       task_info_data_t[TASK_INFO_MAX];
                     48: 
                     49: /*
                     50:  *     Currently defined information structures.
                     51:  */
                     52: #define        TASK_BASIC_INFO         1       /* basic information */
                     53: 
                     54: struct task_basic_info {
                     55:        integer_t       suspend_count;  /* suspend count for task */
                     56:        integer_t       base_priority;  /* base scheduling priority */
                     57:        vm_size_t       virtual_size;   /* number of virtual pages */
                     58:        vm_size_t       resident_size;  /* number of resident pages */
                     59:        time_value_t    user_time;      /* total user run time for
                     60:                                           terminated threads */
                     61:        time_value_t    system_time;    /* total system run time for
                     62:                                           terminated threads */
                     63:        time_value_t    creation_time;  /* creation time stamp */
                     64: };
                     65: 
                     66: typedef struct task_basic_info         task_basic_info_data_t;
                     67: typedef struct task_basic_info         *task_basic_info_t;
                     68: #define        TASK_BASIC_INFO_COUNT   \
                     69:                (sizeof(task_basic_info_data_t) / sizeof(natural_t))
                     70: 
                     71: 
                     72: #define        TASK_EVENTS_INFO        2       /* various event counts */
                     73: 
                     74: struct task_events_info {
                     75:        natural_t               faults;         /* number of page faults */
                     76:        natural_t               zero_fills;     /* number of zero fill pages */
                     77:        natural_t               reactivations;  /* number of reactivated pages */
                     78:        natural_t               pageins;        /* number of actual pageins */
                     79:        natural_t               cow_faults;     /* number of copy-on-write faults */
                     80:        natural_t               messages_sent;  /* number of messages sent */
                     81:        natural_t               messages_received; /* number of messages received */
                     82: };
                     83: typedef struct task_events_info                task_events_info_data_t;
                     84: typedef struct task_events_info                *task_events_info_t;
                     85: #define        TASK_EVENTS_INFO_COUNT  \
                     86:                (sizeof(task_events_info_data_t) / sizeof(natural_t))
                     87: 
                     88: #define        TASK_THREAD_TIMES_INFO  3       /* total times for live threads -
                     89:                                           only accurate if suspended */
                     90: 
                     91: struct task_thread_times_info {
                     92:        time_value_t    user_time;      /* total user run time for
                     93:                                           live threads */
                     94:        time_value_t    system_time;    /* total system run time for
                     95:                                           live threads */
                     96: };
                     97: 
                     98: typedef struct task_thread_times_info  task_thread_times_info_data_t;
                     99: typedef struct task_thread_times_info  *task_thread_times_info_t;
                    100: #define        TASK_THREAD_TIMES_INFO_COUNT    \
                    101:                (sizeof(task_thread_times_info_data_t) / sizeof(natural_t))
                    102: 
                    103: /*
                    104:  * Flavor definitions for task_ras_control
                    105:  */
                    106: #define TASK_RAS_CONTROL_PURGE_ALL                     0
                    107: #define TASK_RAS_CONTROL_PURGE_ONE                     1
                    108: #define TASK_RAS_CONTROL_PURGE_ALL_AND_INSTALL_ONE     2
                    109: #define TASK_RAS_CONTROL_INSTALL_ONE                   3
                    110: 
                    111: #endif /* _MACH_TASK_INFO_H_ */
                    112: 

unix.superglobalmegacorp.com

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