Annotation of kernel/bsd/sys/table.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) 1986 Carnegie-Mellon University
                     28:  * All rights reserved.  The CMU software License Agreement specifies
                     29:  * the terms and conditions for use and redistribution.
                     30:  */
                     31: /*
                     32:  * HISTORY
                     33:  * 27-Apr-97  A.Ramesh
                     34:  *  added limited set to Rhapsody
                     35:  *
                     36:  * 05-Sep-91  Doug Mitchell at NeXT
                     37:  *     Made entire contents PRIVATE.
                     38:  *
                     39:  *
                     40:  */
                     41: 
                     42: #ifdef KERNEL_PRIVATE
                     43: 
                     44: #ifndef        _SYS_TABLE_
                     45: #define _SYS_TABLE_
                     46: 
                     47: #import <sys/dkstat.h>
                     48: #import <machine/table.h>
                     49: 
                     50: #define        TBL_LOADAVG             3       /* (no index) */
                     51: #define        TBL_ARGUMENTS           6       /* index by process ID */
                     52: #define        TBL_PROCINFO            10      /* index by proc table slot */
                     53: #define        TBL_MACHFACTOR          11      /* index by cpu number */
                     54: #define TBL_CPUINFO            12      /* (no index), generic CPU info */
                     55: 
                     56: /*
                     57:  * Machine specific table id base
                     58:  */
                     59: #define TBL_MACHDEP_BASE       0x4000  /* Machine dependent codes start here */
                     60: 
                     61: /*
                     62:  * Return codes from machine dependent calls
                     63:  */
                     64: #define TBL_MACHDEP_NONE       0       /* Not handled by machdep code */
                     65: #define        TBL_MACHDEP_OKAY        1       /* Handled by machdep code */
                     66: #define        TBL_MACHDEP_BAD         -1      /* Bad status from machdep code */
                     67: 
                     68: 
                     69: 
                     70: /*
                     71:  *  TBL_LOADAVG data layout
                     72:  *  (used by TBL_MACHFACTOR too)
                     73:  */
                     74: struct tbl_loadavg
                     75: {
                     76:     long   tl_avenrun[3];
                     77:     int    tl_lscale;          /* 0 scale when floating point */
                     78: };
                     79: 
                     80: /*
                     81:  *     TBL_PROCINFO data layout
                     82:  */
                     83: #define        PI_COMLEN       19      /* length of command string */
                     84: struct tbl_procinfo
                     85: {
                     86:     int                pi_uid;         /* user ID */
                     87:     int                pi_pid;         /* proc ID */
                     88:     int                pi_ppid;        /* parent proc ID */
                     89:     int                pi_pgrp;        /* proc group ID */
                     90:     int                pi_ttyd;        /* controlling terminal number */
                     91:     int                pi_status;      /* process status: */
                     92: #define        PI_EMPTY        0           /* no process */
                     93: #define        PI_ACTIVE       1           /* active process */
                     94: #define        PI_EXITING      2           /* exiting */
                     95: #define        PI_ZOMBIE       3           /* zombie */
                     96:     int                pi_flag;        /* other random flags */
                     97:     char       pi_comm[PI_COMLEN+1];
                     98:                                /* short command name */
                     99: };
                    100: 
                    101: /*
                    102:  * TBL_CPUINFO data layout
                    103:  */
                    104: struct tbl_cpuinfo
                    105: {
                    106:     int                ci_swtch;               /* # context switches */
                    107:     int                ci_intr;                /* # interrupts */
                    108:     int                ci_syscall;             /* # system calls */
                    109:     int                ci_traps;               /* # system traps */
                    110:     int                ci_hz;                  /* # ticks per second */
                    111:     int                ci_phz;                 /* profiling hz */
                    112:     int                ci_cptime[CPUSTATES];   /* cpu state times */
                    113: };
                    114: 
                    115: 
                    116: 
                    117: #ifdef KERNEL
                    118: /*
                    119:  * Machine specific procedure prototypes.
                    120:  */
                    121: int machine_table(int id, int index, caddr_t addr, int nel, u_int lel, int set);
                    122: int machine_table_setokay(int id);
                    123: #endif /* KERNEL */
                    124: 
                    125: #endif /* _SYS_TABLE_ */
                    126: 
                    127: #endif /* KERNEL_PRIVATE */

unix.superglobalmegacorp.com

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