xref: /titanic_51/usr/src/ucbhead/sys/rusage.h (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <sys/time.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /*
39  * Resource utilization information.
40  */
41 
42 #define	RUSAGE_SELF	0
43 #define	RUSAGE_CHILDREN	-1
44 
45 struct	rusage {
46 	struct timeval ru_utime;	/* user time used */
47 	struct timeval ru_stime;	/* system time used */
48 	long	ru_maxrss;
49 #define	ru_first	ru_ixrss
50 	long	ru_ixrss;		/* XXX: 0 */
51 	long	ru_idrss;		/* XXX: sum of rm_asrss */
52 	long	ru_isrss;		/* XXX: 0 */
53 	long	ru_minflt;		/* any page faults not requiring I/O */
54 	long	ru_majflt;		/* any page faults requiring I/O */
55 	long	ru_nswap;		/* swaps */
56 	long	ru_inblock;		/* block input operations */
57 	long	ru_oublock;		/* block output operations */
58 	long	ru_msgsnd;		/* messages sent */
59 	long	ru_msgrcv;		/* messages received */
60 	long	ru_nsignals;		/* signals received */
61 	long	ru_nvcsw;		/* voluntary context switches */
62 	long	ru_nivcsw;		/* involuntary " */
63 #define	ru_last		ru_nivcsw
64 };
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* _SYS_RUSAGE_H */
71