| 1 | /* Copyright (C) 1991-2020 Free Software Foundation, Inc. | 
|---|
| 2 | This file is part of the GNU C Library. | 
|---|
| 3 |  | 
|---|
| 4 | The GNU C Library is free software; you can redistribute it and/or | 
|---|
| 5 | modify it under the terms of the GNU Lesser General Public | 
|---|
| 6 | License as published by the Free Software Foundation; either | 
|---|
| 7 | version 2.1 of the License, or (at your option) any later version. | 
|---|
| 8 |  | 
|---|
| 9 | The GNU C Library is distributed in the hope that it will be useful, | 
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
|---|
| 12 | Lesser General Public License for more details. | 
|---|
| 13 |  | 
|---|
| 14 | You should have received a copy of the GNU Lesser General Public | 
|---|
| 15 | License along with the GNU C Library; if not, see | 
|---|
| 16 | <https://www.gnu.org/licenses/>.  */ | 
|---|
| 17 |  | 
|---|
| 18 | #ifndef _SYS_VTIMES_H | 
|---|
| 19 | #define _SYS_VTIMES_H	1 | 
|---|
| 20 |  | 
|---|
| 21 | #include <features.h> | 
|---|
| 22 |  | 
|---|
| 23 | __BEGIN_DECLS | 
|---|
| 24 |  | 
|---|
| 25 | /* This interface is obsolete; use `getrusage' instead.  */ | 
|---|
| 26 |  | 
|---|
| 27 | /* Granularity of the `vm_utime' and `vm_stime' fields of a `struct vtimes'. | 
|---|
| 28 | (This is the frequency of the machine's power supply, in Hz.)  */ | 
|---|
| 29 | #define	VTIMES_UNITS_PER_SECOND	60 | 
|---|
| 30 |  | 
|---|
| 31 | struct vtimes | 
|---|
| 32 | { | 
|---|
| 33 | /* User time used in units of 1/VTIMES_UNITS_PER_SECOND seconds.  */ | 
|---|
| 34 | int vm_utime; | 
|---|
| 35 | /* System time used in units of 1/VTIMES_UNITS_PER_SECOND seconds.  */ | 
|---|
| 36 | int vm_stime; | 
|---|
| 37 |  | 
|---|
| 38 | /* Amount of data and stack memory used (kilobyte-seconds).  */ | 
|---|
| 39 | unsigned int ; | 
|---|
| 40 | /* Amount of text memory used (kilobyte-seconds).  */ | 
|---|
| 41 | unsigned int ; | 
|---|
| 42 | /* Maximum resident set size (text, data, and stack) (kilobytes).  */ | 
|---|
| 43 | int ; | 
|---|
| 44 |  | 
|---|
| 45 | /* Number of hard page faults (i.e. those that required I/O).  */ | 
|---|
| 46 | int vm_majflt; | 
|---|
| 47 | /* Number of soft page faults (i.e. those serviced by reclaiming | 
|---|
| 48 | a page from the list of pages awaiting reallocation.  */ | 
|---|
| 49 | int vm_minflt; | 
|---|
| 50 |  | 
|---|
| 51 | /* Number of times a process was swapped out of physical memory.  */ | 
|---|
| 52 | int vm_nswap; | 
|---|
| 53 |  | 
|---|
| 54 | /* Number of input operations via the file system.  Note: This | 
|---|
| 55 | and `ru_oublock' do not include operations with the cache.  */ | 
|---|
| 56 | int vm_inblk; | 
|---|
| 57 | /* Number of output operations via the file system.  */ | 
|---|
| 58 | int vm_oublk; | 
|---|
| 59 | }; | 
|---|
| 60 |  | 
|---|
| 61 | /* If CURRENT is not NULL, write statistics for the current process into | 
|---|
| 62 | *CURRENT.  If CHILD is not NULL, write statistics for all terminated child | 
|---|
| 63 | processes into *CHILD.  Returns 0 for success, -1 for failure.  */ | 
|---|
| 64 | extern int vtimes (struct vtimes * __current, struct vtimes * __child) __THROW; | 
|---|
| 65 |  | 
|---|
| 66 | __END_DECLS | 
|---|
| 67 |  | 
|---|
| 68 | #endif /* sys/vtimes.h  */ | 
|---|
| 69 |  | 
|---|