]>
git.saurik.com Git - apple/xnu.git/blob - bsd/sys/table.h
2 * Copyright (c) 2000 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.
31 * added limited set to MacOSX
33 * 05-Sep-91 Doug Mitchell at NeXT
34 * Made entire contents PRIVATE.
44 #include <sys/dkstat.h>
45 #include <machine/table.h>
47 #define TBL_LOADAVG 3 /* (no index) */
48 #define TBL_ARGUMENTS 6 /* index by process ID */
49 #define TBL_PROCINFO 10 /* index by proc table slot */
50 #define TBL_MACHFACTOR 11 /* index by cpu number */
51 #define TBL_CPUINFO 12 /* (no index), generic CPU info */
54 * Machine specific table id base
56 #define TBL_MACHDEP_BASE 0x4000 /* Machine dependent codes start here */
59 * Return codes from machine dependent calls
61 #define TBL_MACHDEP_NONE 0 /* Not handled by machdep code */
62 #define TBL_MACHDEP_OKAY 1 /* Handled by machdep code */
63 #define TBL_MACHDEP_BAD -1 /* Bad status from machdep code */
68 * TBL_LOADAVG data layout
69 * (used by TBL_MACHFACTOR too)
74 int tl_lscale
; /* 0 scale when floating point */
78 * TBL_PROCINFO data layout
80 #define PI_COMLEN 19 /* length of command string */
83 int pi_uid
; /* user ID */
84 int pi_pid
; /* proc ID */
85 int pi_ppid
; /* parent proc ID */
86 int pi_pgrp
; /* proc group ID */
87 int pi_ttyd
; /* controlling terminal number */
88 int pi_status
; /* process status: */
89 #define PI_EMPTY 0 /* no process */
90 #define PI_ACTIVE 1 /* active process */
91 #define PI_EXITING 2 /* exiting */
92 #define PI_ZOMBIE 3 /* zombie */
93 int pi_flag
; /* other random flags */
94 char pi_comm
[PI_COMLEN
+1];
95 /* short command name */
99 * TBL_CPUINFO data layout
103 int ci_swtch
; /* # context switches */
104 int ci_intr
; /* # interrupts */
105 int ci_syscall
; /* # system calls */
106 int ci_traps
; /* # system traps */
107 int ci_hz
; /* # ticks per second */
108 int ci_phz
; /* profiling hz */
109 int ci_cptime
[CPUSTATES
]; /* cpu state times */
116 * Machine specific procedure prototypes.
118 int machine_table(int id
, int index
, caddr_t addr
, int nel
, u_int lel
, int set
);
119 int machine_table_setokay(int id
);
122 #endif /* _SYS_TABLE_ */
124 #endif /* KERNEL_PRIVATE */