diff options
author | Jiri Slaby <jslaby@suse.cz> | 2010-03-24 11:11:29 -0400 |
---|---|---|
committer | Jiri Slaby <jirislaby@gmail.com> | 2010-07-16 03:48:48 -0400 |
commit | 5b41535aac0c07135ff6a4c5c2ae115d1c20c0bc (patch) | |
tree | f8db7ec9e07d33aa2af061b49895a0baebafd4cc /include/linux/resource.h | |
parent | 6a1d5e2c85d06da35cdfd93f1a27675bfdc3ad8c (diff) |
rlimits: redo do_setrlimit to more generic do_prlimit
It now allows also reading of limits. I.e. all read and writes will
later use this function.
It takes two parameters, new and old limits which can be both NULL.
If new is non-NULL, the value in it is set to rlimits.
If old is non-NULL, current rlimits are stored there.
If both are non-NULL, old are stored prior to setting the new ones,
atomically.
(Similar to sigaction.)
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include/linux/resource.h')
-rw-r--r-- | include/linux/resource.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/resource.h b/include/linux/resource.h index 037aa7e6335d..88d36f9145ba 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h | |||
@@ -80,8 +80,8 @@ struct rlimit64 { | |||
80 | struct task_struct; | 80 | struct task_struct; |
81 | 81 | ||
82 | int getrusage(struct task_struct *p, int who, struct rusage __user *ru); | 82 | int getrusage(struct task_struct *p, int who, struct rusage __user *ru); |
83 | int do_setrlimit(struct task_struct *tsk, unsigned int resource, | 83 | int do_prlimit(struct task_struct *tsk, unsigned int resource, |
84 | struct rlimit *new_rlim); | 84 | struct rlimit *new_rlim, struct rlimit *old_rlim); |
85 | 85 | ||
86 | #endif /* __KERNEL__ */ | 86 | #endif /* __KERNEL__ */ |
87 | 87 | ||