xref: /illumos-gate/usr/src/ucbhead/sys/rusage.h (revision dd72704bd9e794056c558153663c739e2012d721)
1 /*
2  * CDDL HEADER START
3  *
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
7  * with the License.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1991-1997, by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef _SYS_RUSAGE_H
28 #define	_SYS_RUSAGE_H
29 
30 #include <sys/time.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * Resource utilization information.
38  */
39 
40 #define	RUSAGE_SELF	0
41 #define	RUSAGE_CHILDREN	-1
42 
43 struct	rusage {
44 	struct timeval ru_utime;	/* user time used */
45 	struct timeval ru_stime;	/* system time used */
46 	long	ru_maxrss;
47 #define	ru_first	ru_ixrss
48 	long	ru_ixrss;		/* XXX: 0 */
49 	long	ru_idrss;		/* XXX: sum of rm_asrss */
50 	long	ru_isrss;		/* XXX: 0 */
51 	long	ru_minflt;		/* any page faults not requiring I/O */
52 	long	ru_majflt;		/* any page faults requiring I/O */
53 	long	ru_nswap;		/* swaps */
54 	long	ru_inblock;		/* block input operations */
55 	long	ru_oublock;		/* block output operations */
56 	long	ru_msgsnd;		/* messages sent */
57 	long	ru_msgrcv;		/* messages received */
58 	long	ru_nsignals;		/* signals received */
59 	long	ru_nvcsw;		/* voluntary context switches */
60 	long	ru_nivcsw;		/* involuntary " */
61 #define	ru_last		ru_nivcsw
62 };
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif /* _SYS_RUSAGE_H */
69