aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/resource.h44
-rw-r--r--sysdeps/unix/sysv/linux/bits/resource.h106
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/resource.h44
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/resource.h44
4 files changed, 4 insertions, 234 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index e5d5bc82d0..bd5142caa4 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -176,49 +176,7 @@ enum __rusage_who
};
#include <bits/types/struct_timeval.h>
-
-/* 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_rusage.h>
/* Priority limits. */
#define PRIO_MIN -20 /* Minimum priority a process can have. */
diff --git a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h
index d4dbc268cb..7c064ef2b8 100644
--- a/sysdeps/unix/sysv/linux/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/bits/resource.h
@@ -176,111 +176,7 @@ enum __rusage_who
};
#include <bits/types/struct_timeval.h>
-
-/* Structure which says how much of each resource has been used. */
-
-/* The purpose of all the unions is to have the kernel-compatible layout
- while keeping the API type as 'long int', and among machines where
- __syscall_slong_t is not 'long int', this only does the right thing
- for little-endian ones, like x32. */
-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). */
- __extension__ union
- {
- long int ru_maxrss;
- __syscall_slong_t __ru_maxrss_word;
- };
- /* Amount of sharing of text segment memory
- with other processes (kilobyte-seconds). */
- /* Maximum resident set size (in kilobytes). */
- __extension__ union
- {
- long int ru_ixrss;
- __syscall_slong_t __ru_ixrss_word;
- };
- /* Amount of data segment memory used (kilobyte-seconds). */
- __extension__ union
- {
- long int ru_idrss;
- __syscall_slong_t __ru_idrss_word;
- };
- /* Amount of stack memory used (kilobyte-seconds). */
- __extension__ union
- {
- long int ru_isrss;
- __syscall_slong_t __ru_isrss_word;
- };
- /* Number of soft page faults (i.e. those serviced by reclaiming
- a page from the list of pages awaiting reallocation. */
- __extension__ union
- {
- long int ru_minflt;
- __syscall_slong_t __ru_minflt_word;
- };
- /* Number of hard page faults (i.e. those that required I/O). */
- __extension__ union
- {
- long int ru_majflt;
- __syscall_slong_t __ru_majflt_word;
- };
- /* Number of times a process was swapped out of physical memory. */
- __extension__ union
- {
- long int ru_nswap;
- __syscall_slong_t __ru_nswap_word;
- };
- /* Number of input operations via the file system. Note: This
- and `ru_oublock' do not include operations with the cache. */
- __extension__ union
- {
- long int ru_inblock;
- __syscall_slong_t __ru_inblock_word;
- };
- /* Number of output operations via the file system. */
- __extension__ union
- {
- long int ru_oublock;
- __syscall_slong_t __ru_oublock_word;
- };
- /* Number of IPC messages sent. */
- __extension__ union
- {
- long int ru_msgsnd;
- __syscall_slong_t __ru_msgsnd_word;
- };
- /* Number of IPC messages received. */
- __extension__ union
- {
- long int ru_msgrcv;
- __syscall_slong_t __ru_msgrcv_word;
- };
- /* Number of signals delivered. */
- __extension__ union
- {
- long int ru_nsignals;
- __syscall_slong_t __ru_nsignals_word;
- };
- /* 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). */
- __extension__ union
- {
- long int ru_nvcsw;
- __syscall_slong_t __ru_nvcsw_word;
- };
- /* Number of involuntary context switches, i.e. a higher priority process
- became runnable or the current process used up its time slice. */
- __extension__ union
- {
- long int ru_nivcsw;
- __syscall_slong_t __ru_nivcsw_word;
- };
- };
+#include <bits/types/struct_rusage.h>
/* Priority limits. */
#define PRIO_MIN -20 /* Minimum priority a process can have. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index c59a92b258..c3a479a305 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -184,49 +184,7 @@ enum __rusage_who
};
#include <bits/types/struct_timeval.h>
-
-/* 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_rusage.h>
/* Priority limits. */
#define PRIO_MIN -20 /* Minimum priority a process can have. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/resource.h b/sysdeps/unix/sysv/linux/sparc/bits/resource.h
index 6b65d3aac7..80b1e105a8 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/resource.h
@@ -192,49 +192,7 @@ enum __rusage_who
};
#include <bits/types/struct_timeval.h>
-
-/* 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_rusage.h>
/* Priority limits. */
#define PRIO_MIN -20 /* Minimum priority a process can have. */