16863 implement C23 stdbit.h
[illumos-gate.git] / usr / src / uts / common / sys / acct.h
blobf00884681b9d95eea99815e761f82c8c1d576ed6
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
30 #ifndef _SYS_ACCT_H
31 #define _SYS_ACCT_H
33 #include <sys/types.h>
34 #include <sys/types32.h>
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
41 * Accounting structures
44 typedef ushort_t comp_t; /* "floating point" */
45 /* 13-bit fraction, 3-bit exponent */
47 /* SVR4 acct structure */
48 struct acct {
49 char ac_flag; /* Accounting flag */
50 char ac_stat; /* Exit status */
51 uid32_t ac_uid; /* Accounting user ID */
52 gid32_t ac_gid; /* Accounting group ID */
53 dev32_t ac_tty; /* control typewriter */
54 time32_t ac_btime; /* Beginning time */
55 comp_t ac_utime; /* acctng user time in clock ticks */
56 comp_t ac_stime; /* acctng system time in clock ticks */
57 comp_t ac_etime; /* acctng elapsed time in clock ticks */
58 comp_t ac_mem; /* memory usage */
59 comp_t ac_io; /* chars transferred */
60 comp_t ac_rw; /* blocks read or written */
61 char ac_comm[8]; /* command name */
65 * Account commands will use this header to read SVR3
66 * accounting data files.
69 struct o_acct {
70 char ac_flag; /* Accounting flag */
71 char ac_stat; /* Exit status */
72 o_uid_t ac_uid; /* Accounting user ID */
73 o_gid_t ac_gid; /* Accounting group ID */
74 o_dev_t ac_tty; /* control typewriter */
75 time32_t ac_btime; /* Beginning time */
76 comp_t ac_utime; /* acctng user time in clock ticks */
77 comp_t ac_stime; /* acctng system time in clock ticks */
78 comp_t ac_etime; /* acctng elapsed time in clock ticks */
79 comp_t ac_mem; /* memory usage */
80 comp_t ac_io; /* chars transferred */
81 comp_t ac_rw; /* blocks read or written */
82 char ac_comm[8]; /* command name */
85 #if !defined(_KERNEL)
86 extern int acct(const char *);
87 #endif /* !defined(_KERNEL) */
89 #if defined(_KERNEL)
91 void acct(char);
92 int sysacct(char *);
94 struct vnode;
95 int acct_fs_in_use(struct vnode *);
96 #endif
98 #define AFORK 0001 /* has executed fork, but no exec */
99 #define ASU 0002 /* used super-user privileges */
100 #define AEXPND 0040 /* expanded acct structure */
101 #define ACCTF 0300 /* record type: 00 = acct */
103 #ifdef __cplusplus
105 #endif
107 #endif /* _SYS_ACCT_H */