hjl / source-git / glibc

Forked from source-git/glibc 3 years ago
Clone

Blame resource/sys/vtimes.h

Packit 6c4009
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _SYS_VTIMES_H
Packit 6c4009
#define _SYS_VTIMES_H	1
Packit 6c4009
Packit 6c4009
#include <features.h>
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
/* This interface is obsolete; use `getrusage' instead.  */
Packit 6c4009
Packit 6c4009
/* Granularity of the `vm_utime' and `vm_stime' fields of a `struct vtimes'.
Packit 6c4009
   (This is the frequency of the machine's power supply, in Hz.)  */
Packit 6c4009
#define	VTIMES_UNITS_PER_SECOND	60
Packit 6c4009
Packit 6c4009
struct vtimes
Packit 6c4009
{
Packit 6c4009
  /* User time used in units of 1/VTIMES_UNITS_PER_SECOND seconds.  */
Packit 6c4009
  int vm_utime;
Packit 6c4009
  /* System time used in units of 1/VTIMES_UNITS_PER_SECOND seconds.  */
Packit 6c4009
  int vm_stime;
Packit 6c4009
Packit 6c4009
  /* Amount of data and stack memory used (kilobyte-seconds).  */
Packit 6c4009
  unsigned int vm_idsrss;
Packit 6c4009
  /* Amount of text memory used (kilobyte-seconds).  */
Packit 6c4009
  unsigned int vm_ixrss;
Packit 6c4009
  /* Maximum resident set size (text, data, and stack) (kilobytes).  */
Packit 6c4009
  int vm_maxrss;
Packit 6c4009
Packit 6c4009
  /* Number of hard page faults (i.e. those that required I/O).  */
Packit 6c4009
  int vm_majflt;
Packit 6c4009
  /* Number of soft page faults (i.e. those serviced by reclaiming
Packit 6c4009
     a page from the list of pages awaiting reallocation.  */
Packit 6c4009
  int vm_minflt;
Packit 6c4009
Packit 6c4009
  /* Number of times a process was swapped out of physical memory.  */
Packit 6c4009
  int vm_nswap;
Packit 6c4009
Packit 6c4009
  /* Number of input operations via the file system.  Note: This
Packit 6c4009
     and `ru_oublock' do not include operations with the cache.  */
Packit 6c4009
  int vm_inblk;
Packit 6c4009
  /* Number of output operations via the file system.  */
Packit 6c4009
  int vm_oublk;
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
/* If CURRENT is not NULL, write statistics for the current process into
Packit 6c4009
   *CURRENT.  If CHILD is not NULL, write statistics for all terminated child
Packit 6c4009
   processes into *CHILD.  Returns 0 for success, -1 for failure.  */
Packit 6c4009
extern int vtimes (struct vtimes * __current, struct vtimes * __child) __THROW;
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* sys/vtimes.h  */