summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/bits/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/resource.h')
-rw-r--r--sysdeps/unix/sysv/linux/bits/resource.h115
1 files changed, 68 insertions, 47 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h
index 05cae83244..9ee6ea5b27 100644
--- a/sysdeps/unix/sysv/linux/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/bits/resource.h
@@ -1,5 +1,5 @@
 /* Bit values & structures for resource limits.  Linux version.
-   Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1996, 1997 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
@@ -18,6 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <asm/resource.h>
+#include <bits/types.h>
 
 /* Transmute defines to enumerations.  The macro re-definitions are
    necessary because some programs want to test for operating system
@@ -103,13 +104,33 @@ enum __rlimit_resource
 #define RLIM_INFINITY RLIM_INFINITY
 };
 
+/* Type for resource quantity measurement.  */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
 struct rlimit
-{
-  /* The current (soft) limit.  */
-  long int rlim_cur;
-  /* The hard limit.  */
-  long int rlim_max;
-};
+  {
+    /* The current (soft) limit.  */
+    rlim_t rlim_cur;
+    /* The hard limit.  */
+    rlim_t rlim_max;
+  };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+  {
+    /* The current (soft) limit.  */
+    rlim64_t rlim_cur;
+    /* The hard limit.  */
+    rlim64_t rlim_max;
+ };
+#endif
 
 /* Whose usage statistics do you want?  */
 enum __rusage_who
@@ -131,46 +152,46 @@ enum __rusage_who
 
 /* 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;
-};
+  {
+    /* 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;
+  };
 
 /* Priority limits.  */
 #define PRIO_MIN	-20	/* Minimum priority a process can have.  */