]>
git.saurik.com Git - apple/xnu.git/blob - bsd/sys/table.h
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
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.
35 #include <sys/appleapiopts.h>
37 #warning obsolete header! Please delete the include from your sources.
41 #ifdef __APPLE_API_OBSOLETE
42 #include <sys/dkstat.h>
43 #include <machine/table.h>
45 #define TBL_LOADAVG 3 /* (no index) */
46 #define TBL_ARGUMENTS 6 /* index by process ID */
47 #define TBL_PROCINFO 10 /* index by proc table slot */
48 #define TBL_MACHFACTOR 11 /* index by cpu number */
49 #define TBL_CPUINFO 12 /* (no index), generic CPU info */
52 * Machine specific table id base
54 #define TBL_MACHDEP_BASE 0x4000 /* Machine dependent codes start here */
57 * Return codes from machine dependent calls
59 #define TBL_MACHDEP_NONE 0 /* Not handled by machdep code */
60 #define TBL_MACHDEP_OKAY 1 /* Handled by machdep code */
61 #define TBL_MACHDEP_BAD -1 /* Bad status from machdep code */
66 * TBL_LOADAVG data layout
67 * (used by TBL_MACHFACTOR too)
72 int tl_lscale
; /* 0 scale when floating point */
76 * TBL_PROCINFO data layout
78 #define PI_COMLEN 19 /* length of command string */
81 int pi_uid
; /* user ID */
82 int pi_pid
; /* proc ID */
83 int pi_ppid
; /* parent proc ID */
84 int pi_pgrp
; /* proc group ID */
85 int pi_ttyd
; /* controlling terminal number */
86 int pi_status
; /* process status: */
87 #define PI_EMPTY 0 /* no process */
88 #define PI_ACTIVE 1 /* active process */
89 #define PI_EXITING 2 /* exiting */
90 #define PI_ZOMBIE 3 /* zombie */
91 int pi_flag
; /* other random flags */
92 char pi_comm
[PI_COMLEN
+1];
93 /* short command name */
97 * TBL_CPUINFO data layout
101 int ci_swtch
; /* # context switches */
102 int ci_intr
; /* # interrupts */
103 int ci_syscall
; /* # system calls */
104 int ci_traps
; /* # system traps */
105 int ci_hz
; /* # ticks per second */
106 int ci_phz
; /* profiling hz */
107 int ci_cptime
[CPUSTATES
]; /* cpu state times */
114 * Machine specific procedure prototypes.
116 int machine_table(int id
, int index
, caddr_t addr
, int nel
, u_int lel
, int set
);
117 int machine_table_setokay(int id
);
120 #endif /* __APPLE_API_OBSOLETE */
122 #endif /* KERNEL_PRIVATE */
123 #endif /* _SYS_TABLE_ */