Annotation of kernel/mach/task_info.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
                      7:  * Reserved.  This file contains Original Code and/or Modifications of
                      8:  * Original Code as defined in and that are subject to the Apple Public
                      9:  * Source License Version 1.1 (the "License").  You may not use this file
                     10:  * except in compliance with the License.  Please obtain a copy of the
                     11:  * License at http://www.apple.com/publicsource and read it before using
                     12:  * this file.
                     13:  * 
                     14:  * The Original Code and all software distributed under the License are
                     15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     19:  * License for the specific language governing rights and limitations
                     20:  * under the License.
                     21:  * 
                     22:  * @APPLE_LICENSE_HEADER_END@
                     23:  */
                     24: 
                     25: /* 
                     26:  * Mach Operating System
                     27:  * Copyright (c) 1993-1987 Carnegie Mellon University
                     28:  * All Rights Reserved.
                     29:  * 
                     30:  * Permission to use, copy, modify and distribute this software and its
                     31:  * documentation is hereby granted, provided that both the copyright
                     32:  * notice and this permission notice appear in all copies of the
                     33:  * software, derivative works or modified versions, and any portions
                     34:  * thereof, and that both notices appear in supporting documentation.
                     35:  * 
                     36:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     37:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     38:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     39:  * 
                     40:  * Carnegie Mellon requests users of this software to return to
                     41:  * 
                     42:  *  Software Distribution Coordinator  or  [email protected]
                     43:  *  School of Computer Science
                     44:  *  Carnegie Mellon University
                     45:  *  Pittsburgh PA 15213-3890
                     46:  * 
                     47:  * any improvements or extensions that they make and grant Carnegie Mellon
                     48:  * the rights to redistribute these changes.
                     49:  */
                     50: /*
                     51:  *     Machine-independent task information structures and definitions.
                     52:  *
                     53:  *     The definitions in this file are exported to the user.  The kernel
                     54:  *     will translate its internal data structures to these structures
                     55:  *     as appropriate.
                     56:  *
                     57:  */
                     58: 
                     59: #ifndef        _MACH_TASK_INFO_H_
                     60: #define        _MACH_TASK_INFO_H_
                     61: 
                     62: #import <mach/machine/vm_types.h>
                     63: #import <mach/time_value.h>
                     64: 
                     65: /*
                     66:  *     Generic information structure to allow for expansion.
                     67:  */
                     68: typedef        integer_t       *task_info_t;           /* varying array of int */
                     69: 
                     70: #define        TASK_INFO_MAX   (1024)          /* maximum array size */
                     71: typedef        integer_t       task_info_data_t[TASK_INFO_MAX];
                     72: 
                     73: /*
                     74:  *     Currently defined information structures.
                     75:  */
                     76: #define        TASK_BASIC_INFO         1       /* basic information */
                     77: 
                     78: struct task_basic_info {
                     79:        integer_t       suspend_count;  /* suspend count for task */
                     80:        integer_t       base_priority;  /* base scheduling priority */
                     81:        vm_size_t       virtual_size;   /* number of virtual pages */
                     82:        vm_size_t       resident_size;  /* number of resident pages */
                     83:        time_value_t    user_time;      /* total user run time for
                     84:                                           terminated threads */
                     85:        time_value_t    system_time;    /* total system run time for
                     86:                                           terminated threads */
                     87: };
                     88: 
                     89: typedef struct task_basic_info         task_basic_info_data_t;
                     90: typedef struct task_basic_info         *task_basic_info_t;
                     91: #define        TASK_BASIC_INFO_COUNT   \
                     92:                (sizeof(task_basic_info_data_t) / sizeof(natural_t))
                     93: 
                     94: 
                     95: #define        TASK_EVENTS_INFO        2       /* various event counts */
                     96: 
                     97: struct task_events_info {
                     98:        natural_t               faults;         /* number of page faults */
                     99:        natural_t               zero_fills;     /* number of zero fill pages */
                    100:        natural_t               reactivations;  /* number of reactivated pages */
                    101:        natural_t               pageins;        /* number of actual pageins */
                    102:        natural_t               cow_faults;     /* number of copy-on-write faults */
                    103:        natural_t               messages_sent;  /* number of messages sent */
                    104:        natural_t               messages_received; /* number of messages received */
                    105: };
                    106: typedef struct task_events_info                task_events_info_data_t;
                    107: typedef struct task_events_info                *task_events_info_t;
                    108: #define        TASK_EVENTS_INFO_COUNT  \
                    109:                (sizeof(task_events_info_data_t) / sizeof(natural_t))
                    110: 
                    111: #define        TASK_THREAD_TIMES_INFO  3       /* total times for live threads -
                    112:                                           only accurate if suspended */
                    113: 
                    114: struct task_thread_times_info {
                    115:        time_value_t    user_time;      /* total user run time for
                    116:                                           live threads */
                    117:        time_value_t    system_time;    /* total system run time for
                    118:                                           live threads */
                    119: };
                    120: 
                    121: typedef struct task_thread_times_info  task_thread_times_info_data_t;
                    122: typedef struct task_thread_times_info  *task_thread_times_info_t;
                    123: #define        TASK_THREAD_TIMES_INFO_COUNT    \
                    124:                (sizeof(task_thread_times_info_data_t) / sizeof(natural_t))
                    125: 
                    126: /*
                    127:  * Flavor definitions for task_ras_control
                    128:  */
                    129: #define TASK_RAS_CONTROL_PURGE_ALL                     0
                    130: #define TASK_RAS_CONTROL_PURGE_ONE                     1
                    131: #define TASK_RAS_CONTROL_PURGE_ALL_AND_INSTALL_ONE     2
                    132: #define TASK_RAS_CONTROL_INSTALL_ONE                   3
                    133: 
                    134: #endif /* _MACH_TASK_INFO_H_ */
                    135: 

unix.superglobalmegacorp.com

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