Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
getrusage.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2013-2020 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/*
20 Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
21 Portions Copyright (c) 1994, Regents of the University of California
22
23 This file is licensed under a BSD license.
24*/
25
26#pragma once
27
28#include <sys/time.h> /* for struct timeval */
29
30struct rusage {
31 struct timeval ru_utime; /* user CPU time used */
32 struct timeval ru_stime; /* system CPU time used */
33 long ru_maxrss; /* maximum resident set size */
34 long ru_ixrss; /* integral shared memory size */
35 long ru_idrss; /* integral unshared data size */
36 long ru_isrss; /* integral unshared stack size */
37 long ru_minflt; /* page reclaims (soft page faults) */
38 long ru_majflt; /* page faults (hard page faults) */
39 long ru_nswap; /* swaps */
40 long ru_inblock; /* block input operations */
41 long ru_oublock; /* block output operations */
42 long ru_msgsnd; /* IPC messages sent */
43 long ru_msgrcv; /* IPC messages received */
44 long ru_nsignals; /* signals received */
45 long ru_nvcsw; /* voluntary context switches */
46 long ru_nivcsw; /* involuntary context switches */
47};
48
49#ifndef RUSAGE_SELF
50#define RUSAGE_SELF 1
51#endif
52
53#ifndef RUSAGE_CHILDREN
54#define RUSAGE_CHILDREN 2
55#endif
56
57#ifndef RUSAGE_THREAD
58#define RUSAGE_THREAD 3
59#endif
60
61extern int getrusage(int who, struct rusage *rusage);
62
63// clang-format off
64// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
65// vim: shiftwidth=2 expandtab tabstop=2 cindent
66// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
67// clang-format on
68
int getrusage(int who, struct rusage *rusage)
Definition getrusage.c:53
Definition getrusage.h:30
long ru_nvcsw
Definition getrusage.h:45
long ru_nswap
Definition getrusage.h:39
struct timeval ru_utime
Definition getrusage.h:31
long ru_minflt
Definition getrusage.h:37
long ru_nivcsw
Definition getrusage.h:46
struct timeval ru_stime
Definition getrusage.h:32
long ru_isrss
Definition getrusage.h:36
long ru_majflt
Definition getrusage.h:38
long ru_idrss
Definition getrusage.h:35
long ru_nsignals
Definition getrusage.h:44
long ru_msgsnd
Definition getrusage.h:42
long ru_ixrss
Definition getrusage.h:34
long ru_inblock
Definition getrusage.h:40
long ru_msgrcv
Definition getrusage.h:43
long ru_maxrss
Definition getrusage.h:33
long ru_oublock
Definition getrusage.h:41