4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
35 #define LMS_USER 0 /* running in user mode */
36 #define LMS_SYSTEM 1 /* running in sys call or page fault */
37 #define LMS_TRAP 2 /* running in other trap */
38 #define LMS_TFAULT 3 /* asleep in user text page fault */
39 #define LMS_DFAULT 4 /* asleep in user data page fault */
40 #define LMS_KFAULT 5 /* asleep in kernel page fault */
41 #define LMS_USER_LOCK 6 /* asleep waiting for user-mode lock */
42 #define LMS_SLEEP 7 /* asleep for any other reason */
43 #define LMS_WAIT_CPU 8 /* waiting for CPU (latency) */
44 #define LMS_STOPPED 9 /* stopped (/proc, jobcontrol, lwp_suspend) */
47 * NMSTATES must never exceed 17 because of the size restriction
48 * of 128 bytes imposed on struct siginfo (see <sys/siginfo.h>).
50 #define NMSTATES 10 /* number of microstates */
55 * The following define the implemented CPU microstates
61 #define CMS_DISABLED 3
64 * NCMSTATES is set to NMSTATES - 1, because CMS_DISABLED is not a state for
65 * which accounting information is kept. CPUs that are offline but remain in
66 * the system are kept in the CMS_IDLE state until they are brought back online,
67 * or unconfigured and deleted from the system. Only when a cpu is unconfigured
68 * and about to be deleted is the CMS_DISABLED state entered. It is a
69 * placeholder state to ensure that our behavior is sane. ASSERT()s exist to
79 #endif /* _SYS_MSACCT_H */