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