diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-02-16 05:19:18 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-02-16 05:19:18 -0500 |
commit | ba9341dfef6b0201cd30e3904dcd0a47d3dc35e0 (patch) | |
tree | d83637979db83bb9d5a23e190148b90b60c976d2 /include/linux/sched.h | |
parent | d39e82db73eb876c60d00f00219d767b3be30307 (diff) | |
parent | f167e1d073278fe231bbdd5d6c24fb9d091aa544 (diff) |
Merge branch 'fixes' into devel
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 f2f842db03ce..8d4991be9d53 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) | |||
2601 | } | 2601 | } |
2602 | #endif /* CONFIG_MM_OWNER */ | 2602 | #endif /* CONFIG_MM_OWNER */ |
2603 | 2603 | ||
2604 | static inline unsigned long task_rlimit(const struct task_struct *tsk, | ||
2605 | unsigned int limit) | ||
2606 | { | ||
2607 | return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_cur); | ||
2608 | } | ||
2609 | |||
2610 | static inline unsigned long task_rlimit_max(const struct task_struct *tsk, | ||
2611 | unsigned int limit) | ||
2612 | { | ||
2613 | return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_max); | ||
2614 | } | ||
2615 | |||
2616 | static inline unsigned long rlimit(unsigned int limit) | ||
2617 | { | ||
2618 | return task_rlimit(current, limit); | ||
2619 | } | ||
2620 | |||
2621 | static inline unsigned long rlimit_max(unsigned int limit) | ||
2622 | { | ||
2623 | return task_rlimit_max(current, limit); | ||
2624 | } | ||
2625 | |||
2604 | #endif /* __KERNEL__ */ | 2626 | #endif /* __KERNEL__ */ |
2605 | 2627 | ||
2606 | #endif | 2628 | #endif |