summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/bits/resource.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-08-11 11:18:52 -0700
committerUlrich Drepper <drepper@redhat.com>2010-08-11 11:18:52 -0700
commitc08fb0d7bba4015078406b28d3906ccc5fda9d5a (patch)
tree6952d7d0b4ddf0f57b1358918a80e8373c11c437 /sysdeps/unix/sysv/linux/bits/resource.h
parent15bac72bac03faeb3b725b1d208c62160f0c3ad7 (diff)
downloadglibc-c08fb0d7bba4015078406b28d3906ccc5fda9d5a.tar.gz
Add support for prlimit and prlimit64 on Linux.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/resource.h')
-rw-r--r--sysdeps/unix/sysv/linux/bits/resource.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h
index cb3acf1622..ca2c9f0160 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, 1997, 1998, 1999, 2000, 2004, 2005, 2008, 2009
+ Copyright (C) 1994, 1996-2000, 2004, 2005, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -232,3 +232,31 @@ enum __priority_which
PRIO_USER = 2 /* WHO is a user ID. */
#define PRIO_USER PRIO_USER
};
+
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+/* Modify and return resource limits of a process atomically. */
+# ifndef __USE_FILE_OFFSET64
+extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
+ __const struct rlimit *__new_limit,
+ struct rlimit *__old_limit) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
+ enum __rlimit_resource __resource,
+ __const struct rlimit *__new_limit,
+ struct rlimit *__old_limit), prlimit64);
+# else
+# define prlimit prlimit64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
+ __const struct rlimit64 *__new_limit,
+ struct rlimit64 *__old_limit) __THROW;
+# endif
+#endif
+
+__END_DECLS