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.h39
1 files changed, 16 insertions, 23 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 85b53f87c703..a72e17135421 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -105,6 +105,7 @@ extern unsigned long nr_iowait(void);
105#include <linux/param.h> 105#include <linux/param.h>
106#include <linux/resource.h> 106#include <linux/resource.h>
107#include <linux/timer.h> 107#include <linux/timer.h>
108#include <linux/hrtimer.h>
108 109
109#include <asm/processor.h> 110#include <asm/processor.h>
110 111
@@ -398,8 +399,8 @@ struct signal_struct {
398 struct list_head posix_timers; 399 struct list_head posix_timers;
399 400
400 /* ITIMER_REAL timer for the process */ 401 /* ITIMER_REAL timer for the process */
401 struct timer_list real_timer; 402 struct hrtimer real_timer;
402 unsigned long it_real_value, it_real_incr; 403 ktime_t it_real_incr;
403 404
404 /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */ 405 /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */
405 cputime_t it_prof_expires, it_virt_expires; 406 cputime_t it_prof_expires, it_virt_expires;
@@ -630,7 +631,14 @@ struct sched_domain {
630 631
631extern void partition_sched_domains(cpumask_t *partition1, 632extern void partition_sched_domains(cpumask_t *partition1,
632 cpumask_t *partition2); 633 cpumask_t *partition2);
633#endif /* CONFIG_SMP */ 634
635/*
636 * Maximum cache size the migration-costs auto-tuning code will
637 * search from:
638 */
639extern unsigned int max_cache_size;
640
641#endif /* CONFIG_SMP */
634 642
635 643
636struct io_context; /* See blkdev.h */ 644struct io_context; /* See blkdev.h */
@@ -688,9 +696,12 @@ struct task_struct {
688 696
689 int lock_depth; /* BKL lock depth */ 697 int lock_depth; /* BKL lock depth */
690 698
691#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) 699#if defined(CONFIG_SMP)
700 int last_waker_cpu; /* CPU that last woke this task up */
701#if defined(__ARCH_WANT_UNLOCKED_CTXSW)
692 int oncpu; 702 int oncpu;
693#endif 703#endif
704#endif
694 int prio, static_prio; 705 int prio, static_prio;
695 struct list_head run_list; 706 struct list_head run_list;
696 prio_array_t *array; 707 prio_array_t *array;
@@ -1111,21 +1122,6 @@ static inline int sas_ss_flags(unsigned long sp)
1111 : on_sig_stack(sp) ? SS_ONSTACK : 0); 1122 : on_sig_stack(sp) ? SS_ONSTACK : 0);
1112} 1123}
1113 1124
1114
1115#ifdef CONFIG_SECURITY
1116/* code is in security.c */
1117extern int capable(int cap);
1118#else
1119static inline int capable(int cap)
1120{
1121 if (cap_raised(current->cap_effective, cap)) {
1122 current->flags |= PF_SUPERPRIV;
1123 return 1;
1124 }
1125 return 0;
1126}
1127#endif
1128
1129/* 1125/*
1130 * Routines for handling mm_structs 1126 * Routines for handling mm_structs
1131 */ 1127 */
@@ -1244,6 +1240,7 @@ static inline void task_unlock(struct task_struct *p)
1244#ifndef __HAVE_THREAD_FUNCTIONS 1240#ifndef __HAVE_THREAD_FUNCTIONS
1245 1241
1246#define task_thread_info(task) (task)->thread_info 1242#define task_thread_info(task) (task)->thread_info
1243#define task_stack_page(task) ((void*)((task)->thread_info))
1247 1244
1248static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) 1245static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
1249{ 1246{
@@ -1389,12 +1386,8 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm)
1389extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); 1386extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
1390extern long sched_getaffinity(pid_t pid, cpumask_t *mask); 1387extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
1391 1388
1392#ifdef CONFIG_MAGIC_SYSRQ
1393
1394extern void normalize_rt_tasks(void); 1389extern void normalize_rt_tasks(void);
1395 1390
1396#endif
1397
1398#ifdef CONFIG_PM 1391#ifdef CONFIG_PM
1399/* 1392/*
1400 * Check if a process has been frozen 1393 * Check if a process has been frozen