summaryrefslogtreecommitdiff
path: root/bits/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'bits/resource.h')
-rw-r--r--bits/resource.h53
1 files changed, 7 insertions, 46 deletions
diff --git a/bits/resource.h b/bits/resource.h
index 7d2d66c7c9..7693d20fed 100644
--- a/bits/resource.h
+++ b/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. 4.4 BSD/generic GNU version.
- Copyright (C) 1994-2016 Free Software Foundation, Inc.
+ Copyright (C) 1994-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -86,6 +86,10 @@ enum __rlimit_resource
# define RLIM64_INFINITY 0x7fffffffffffffffLL
#endif
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
/* Type for resource quantity measurement. */
#ifndef __USE_FILE_OFFSET64
@@ -129,51 +133,8 @@ enum __rusage_who
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
};
-#define __need_timeval
-#include <bits/time.h> /* For `struct timeval'. */
-
-/* Structure which says how much of each resource has been used. */
-struct rusage
- {
- /* Total amount of user time used. */
- struct timeval ru_utime;
- /* Total amount of system time used. */
- struct timeval ru_stime;
- /* Maximum resident set size (in kilobytes). */
- long int ru_maxrss;
- /* Amount of sharing of text segment memory
- with other processes (kilobyte-seconds). */
- long int ru_ixrss;
- /* Amount of data segment memory used (kilobyte-seconds). */
- long int ru_idrss;
- /* Amount of stack memory used (kilobyte-seconds). */
- long int ru_isrss;
- /* Number of soft page faults (i.e. those serviced by reclaiming
- a page from the list of pages awaiting reallocation. */
- long int ru_minflt;
- /* Number of hard page faults (i.e. those that required I/O). */
- long int ru_majflt;
- /* Number of times a process was swapped out of physical memory. */
- long int ru_nswap;
- /* Number of input operations via the file system. Note: This
- and `ru_oublock' do not include operations with the cache. */
- long int ru_inblock;
- /* Number of output operations via the file system. */
- long int ru_oublock;
- /* Number of IPC messages sent. */
- long int ru_msgsnd;
- /* Number of IPC messages received. */
- long int ru_msgrcv;
- /* Number of signals delivered. */
- long int ru_nsignals;
- /* Number of voluntary context switches, i.e. because the process
- gave up the process before it had to (usually to wait for some
- resource to be available). */
- long int ru_nvcsw;
- /* Number of involuntary context switches, i.e. a higher priority process
- became runnable or the current process used up its time slice. */
- long int ru_nivcsw;
- };
+#include <bits/types/struct_timeval.h>
+#include <bits/types/struct_rusage.h>
/* Priority limits. */
#define PRIO_MIN -20 /* Minimum priority a process can have. */