1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Add support for prlimit and prlimit64 on Linux.

This commit is contained in:
Ulrich Drepper
2010-08-11 11:18:52 -07:00
parent 15bac72bac
commit c08fb0d7bb
12 changed files with 154 additions and 2 deletions

View File

@ -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