aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index f2f842db03ce..78efe7c485ac 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -310,6 +310,7 @@ extern void sched_show_task(struct task_struct *p);
310#ifdef CONFIG_DETECT_SOFTLOCKUP 310#ifdef CONFIG_DETECT_SOFTLOCKUP
311extern void softlockup_tick(void); 311extern void softlockup_tick(void);
312extern void touch_softlockup_watchdog(void); 312extern void touch_softlockup_watchdog(void);
313extern void touch_softlockup_watchdog_sync(void);
313extern void touch_all_softlockup_watchdogs(void); 314extern void touch_all_softlockup_watchdogs(void);
314extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, 315extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
315 void __user *buffer, 316 void __user *buffer,
@@ -323,6 +324,9 @@ static inline void softlockup_tick(void)
323static inline void touch_softlockup_watchdog(void) 324static inline void touch_softlockup_watchdog(void)
324{ 325{
325} 326}
327static inline void touch_softlockup_watchdog_sync(void)
328{
329}
326static inline void touch_all_softlockup_watchdogs(void) 330static inline void touch_all_softlockup_watchdogs(void)
327{ 331{
328} 332}
@@ -377,6 +381,8 @@ extern int sysctl_max_map_count;
377 381
378#include <linux/aio.h> 382#include <linux/aio.h>
379 383
384#ifdef CONFIG_MMU
385extern void arch_pick_mmap_layout(struct mm_struct *mm);
380extern unsigned long 386extern unsigned long
381arch_get_unmapped_area(struct file *, unsigned long, unsigned long, 387arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
382 unsigned long, unsigned long); 388 unsigned long, unsigned long);
@@ -386,6 +392,9 @@ arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
386 unsigned long flags); 392 unsigned long flags);
387extern void arch_unmap_area(struct mm_struct *, unsigned long); 393extern void arch_unmap_area(struct mm_struct *, unsigned long);
388extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); 394extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
395#else
396static inline void arch_pick_mmap_layout(struct mm_struct *mm) {}
397#endif
389 398
390#if USE_SPLIT_PTLOCKS 399#if USE_SPLIT_PTLOCKS
391/* 400/*
@@ -1364,7 +1373,7 @@ struct task_struct {
1364 char comm[TASK_COMM_LEN]; /* executable name excluding path 1373 char comm[TASK_COMM_LEN]; /* executable name excluding path
1365 - access with [gs]et_task_comm (which lock 1374 - access with [gs]et_task_comm (which lock
1366 it with task_lock()) 1375 it with task_lock())
1367 - initialized normally by flush_old_exec */ 1376 - initialized normally by setup_new_exec */
1368/* file system info */ 1377/* file system info */
1369 int link_count, total_link_count; 1378 int link_count, total_link_count;
1370#ifdef CONFIG_SYSVIPC 1379#ifdef CONFIG_SYSVIPC
@@ -2491,8 +2500,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
2491 2500
2492#endif /* CONFIG_SMP */ 2501#endif /* CONFIG_SMP */
2493 2502
2494extern void arch_pick_mmap_layout(struct mm_struct *mm);
2495
2496#ifdef CONFIG_TRACING 2503#ifdef CONFIG_TRACING
2497extern void 2504extern void
2498__trace_special(void *__tr, void *__data, 2505__trace_special(void *__tr, void *__data,
@@ -2601,6 +2608,28 @@ static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
2601} 2608}
2602#endif /* CONFIG_MM_OWNER */ 2609#endif /* CONFIG_MM_OWNER */
2603 2610
2611static inline unsigned long task_rlimit(const struct task_struct *tsk,
2612 unsigned int limit)
2613{
2614 return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_cur);
2615}
2616
2617static inline unsigned long task_rlimit_max(const struct task_struct *tsk,
2618 unsigned int limit)
2619{
2620 return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_max);
2621}
2622
2623static inline unsigned long rlimit(unsigned int limit)
2624{
2625 return task_rlimit(current, limit);
2626}
2627
2628static inline unsigned long rlimit_max(unsigned int limit)
2629{
2630 return task_rlimit_max(current, limit);
2631}
2632
2604#endif /* __KERNEL__ */ 2633#endif /* __KERNEL__ */
2605 2634
2606#endif 2635#endif