diff options
| author | Takashi Iwai <tiwai@suse.de> | 2010-01-12 09:40:48 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2010-01-12 09:40:48 +0100 |
| commit | dba9532388b00d591d87c638a47dcc7ba3763fc5 (patch) | |
| tree | cc9de8cbc40d0e927b1924d1d943208e84e21d1f /include/linux/sched.h | |
| parent | 78b8d5d2ee280c463908fd75f3bdf246bcb6ac8d (diff) | |
| parent | c68db7175f4dcb3d5789bb50bea6376fb81f87fe (diff) | |
| download | olio-linux-3.10-dba9532388b00d591d87c638a47dcc7ba3763fc5.tar.xz olio-linux-3.10-dba9532388b00d591d87c638a47dcc7ba3763fc5.zip | |
Merge remote branch 'alsa/fixes' into fix/misc
Diffstat (limited to 'include/linux/sched.h')
| -rw-r--r-- | include/linux/sched.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index f2f842db03c..8d4991be9d5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2601,6 +2601,28 @@ static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p) } #endif /* CONFIG_MM_OWNER */ +static inline unsigned long task_rlimit(const struct task_struct *tsk, + unsigned int limit) +{ + return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_cur); +} + +static inline unsigned long task_rlimit_max(const struct task_struct *tsk, + unsigned int limit) +{ + return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_max); +} + +static inline unsigned long rlimit(unsigned int limit) +{ + return task_rlimit(current, limit); +} + +static inline unsigned long rlimit_max(unsigned int limit) +{ + return task_rlimit_max(current, limit); +} + #endif /* __KERNEL__ */ #endif |