]>
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 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Mach Operating System
24 * Copyright (c) 1986 Carnegie-Mellon University
25 * All rights reserved. The CMU software License Agreement specifies
26 * the terms and conditions for use and redistribution.
32 #include <sys/appleapiopts.h>
34 #warning obsolete header! Please delete the include from your sources.
38 #ifdef __APPLE_API_OBSOLETE
39 #include <sys/dkstat.h>
40 #include <machine/table.h>
42 #define TBL_LOADAVG 3 /* (no index) */
43 #define TBL_ARGUMENTS 6 /* index by process ID */
44 #define TBL_PROCINFO 10 /* index by proc table slot */
45 #define TBL_MACHFACTOR 11 /* index by cpu number */
46 #define TBL_CPUINFO 12 /* (no index), generic CPU info */
49 * Machine specific table id base
51 #define TBL_MACHDEP_BASE 0x4000 /* Machine dependent codes start here */
54 * Return codes from machine dependent calls
56 #define TBL_MACHDEP_NONE 0 /* Not handled by machdep code */
57 #define TBL_MACHDEP_OKAY 1 /* Handled by machdep code */
58 #define TBL_MACHDEP_BAD -1 /* Bad status from machdep code */
63 * TBL_LOADAVG data layout
64 * (used by TBL_MACHFACTOR too)
69 int tl_lscale
; /* 0 scale when floating point */
73 * TBL_PROCINFO data layout
75 #define PI_COMLEN 19 /* length of command string */
78 int pi_uid
; /* user ID */
79 int pi_pid
; /* proc ID */
80 int pi_ppid
; /* parent proc ID */
81 int pi_pgrp
; /* proc group ID */
82 int pi_ttyd
; /* controlling terminal number */
83 int pi_status
; /* process status: */
84 #define PI_EMPTY 0 /* no process */
85 #define PI_ACTIVE 1 /* active process */
86 #define PI_EXITING 2 /* exiting */
87 #define PI_ZOMBIE 3 /* zombie */
88 int pi_flag
; /* other random flags */
89 char pi_comm
[PI_COMLEN
+1];
90 /* short command name */
94 * TBL_CPUINFO data layout
98 int ci_swtch
; /* # context switches */
99 int ci_intr
; /* # interrupts */
100 int ci_syscall
; /* # system calls */
101 int ci_traps
; /* # system traps */
102 int ci_hz
; /* # ticks per second */
103 int ci_phz
; /* profiling hz */
104 int ci_cptime
[CPUSTATES
]; /* cpu state times */
111 * Machine specific procedure prototypes.
113 int machine_table(int id
, int index
, caddr_t addr
, int nel
, u_int lel
, int set
);
114 int machine_table_setokay(int id
);
117 #endif /* __APPLE_API_OBSOLETE */
119 #endif /* KERNEL_PRIVATE */
120 #endif /* _SYS_TABLE_ */