diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 18d63cea2848..94107a2c2840 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -360,7 +360,7 @@ extern signed long schedule_timeout_interruptible(signed long timeout); | |||
360 | extern signed long schedule_timeout_killable(signed long timeout); | 360 | extern signed long schedule_timeout_killable(signed long timeout); |
361 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 361 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
362 | asmlinkage void schedule(void); | 362 | asmlinkage void schedule(void); |
363 | extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | 363 | extern int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner); |
364 | 364 | ||
365 | struct nsproxy; | 365 | struct nsproxy; |
366 | struct user_namespace; | 366 | struct user_namespace; |
@@ -1048,8 +1048,12 @@ struct sched_domain; | |||
1048 | #define WF_FORK 0x02 /* child wakeup after fork */ | 1048 | #define WF_FORK 0x02 /* child wakeup after fork */ |
1049 | 1049 | ||
1050 | #define ENQUEUE_WAKEUP 1 | 1050 | #define ENQUEUE_WAKEUP 1 |
1051 | #define ENQUEUE_WAKING 2 | 1051 | #define ENQUEUE_HEAD 2 |
1052 | #define ENQUEUE_HEAD 4 | 1052 | #ifdef CONFIG_SMP |
1053 | #define ENQUEUE_WAKING 4 /* sched_class::task_waking was called */ | ||
1054 | #else | ||
1055 | #define ENQUEUE_WAKING 0 | ||
1056 | #endif | ||
1053 | 1057 | ||
1054 | #define DEQUEUE_SLEEP 1 | 1058 | #define DEQUEUE_SLEEP 1 |
1055 | 1059 | ||
@@ -1067,12 +1071,11 @@ struct sched_class { | |||
1067 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 1071 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
1068 | 1072 | ||
1069 | #ifdef CONFIG_SMP | 1073 | #ifdef CONFIG_SMP |
1070 | int (*select_task_rq)(struct rq *rq, struct task_struct *p, | 1074 | int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); |
1071 | int sd_flag, int flags); | ||
1072 | 1075 | ||
1073 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1076 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
1074 | void (*post_schedule) (struct rq *this_rq); | 1077 | void (*post_schedule) (struct rq *this_rq); |
1075 | void (*task_waking) (struct rq *this_rq, struct task_struct *task); | 1078 | void (*task_waking) (struct task_struct *task); |
1076 | void (*task_woken) (struct rq *this_rq, struct task_struct *task); | 1079 | void (*task_woken) (struct rq *this_rq, struct task_struct *task); |
1077 | 1080 | ||
1078 | void (*set_cpus_allowed)(struct task_struct *p, | 1081 | void (*set_cpus_allowed)(struct task_struct *p, |
@@ -1200,10 +1203,10 @@ struct task_struct { | |||
1200 | int lock_depth; /* BKL lock depth */ | 1203 | int lock_depth; /* BKL lock depth */ |
1201 | 1204 | ||
1202 | #ifdef CONFIG_SMP | 1205 | #ifdef CONFIG_SMP |
1203 | #ifdef __ARCH_WANT_UNLOCKED_CTXSW | 1206 | struct task_struct *wake_entry; |
1204 | int oncpu; | 1207 | int on_cpu; |
1205 | #endif | ||
1206 | #endif | 1208 | #endif |
1209 | int on_rq; | ||
1207 | 1210 | ||
1208 | int prio, static_prio, normal_prio; | 1211 | int prio, static_prio, normal_prio; |
1209 | unsigned int rt_priority; | 1212 | unsigned int rt_priority; |
@@ -1274,6 +1277,7 @@ struct task_struct { | |||
1274 | 1277 | ||
1275 | /* Revert to default priority/policy when forking */ | 1278 | /* Revert to default priority/policy when forking */ |
1276 | unsigned sched_reset_on_fork:1; | 1279 | unsigned sched_reset_on_fork:1; |
1280 | unsigned sched_contributes_to_load:1; | ||
1277 | 1281 | ||
1278 | pid_t pid; | 1282 | pid_t pid; |
1279 | pid_t tgid; | 1283 | pid_t tgid; |
@@ -2192,8 +2196,10 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
2192 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2196 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
2193 | 2197 | ||
2194 | #ifdef CONFIG_SMP | 2198 | #ifdef CONFIG_SMP |
2199 | void scheduler_ipi(void); | ||
2195 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 2200 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
2196 | #else | 2201 | #else |
2202 | static inline void scheduler_ipi(void) { } | ||
2197 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 2203 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
2198 | long match_state) | 2204 | long match_state) |
2199 | { | 2205 | { |