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.h36
1 files changed, 14 insertions, 22 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 777cd01e240..c15936fe998 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -21,7 +21,8 @@
21#define CLONE_DETACHED 0x00400000 /* Unused, ignored */ 21#define CLONE_DETACHED 0x00400000 /* Unused, ignored */
22#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ 22#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
23#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ 23#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
24#define CLONE_STOPPED 0x02000000 /* Start in stopped state */ 24/* 0x02000000 was previously the unused CLONE_STOPPED (Start in stopped state)
25 and is now available for re-use. */
25#define CLONE_NEWUTS 0x04000000 /* New utsname group? */ 26#define CLONE_NEWUTS 0x04000000 /* New utsname group? */
26#define CLONE_NEWIPC 0x08000000 /* New ipcs */ 27#define CLONE_NEWIPC 0x08000000 /* New ipcs */
27#define CLONE_NEWUSER 0x10000000 /* New user namespace */ 28#define CLONE_NEWUSER 0x10000000 /* New user namespace */
@@ -70,7 +71,6 @@ struct sched_param {
70#include <linux/smp.h> 71#include <linux/smp.h>
71#include <linux/sem.h> 72#include <linux/sem.h>
72#include <linux/signal.h> 73#include <linux/signal.h>
73#include <linux/path.h>
74#include <linux/compiler.h> 74#include <linux/compiler.h>
75#include <linux/completion.h> 75#include <linux/completion.h>
76#include <linux/pid.h> 76#include <linux/pid.h>
@@ -88,7 +88,6 @@ struct sched_param {
88#include <linux/timer.h> 88#include <linux/timer.h>
89#include <linux/hrtimer.h> 89#include <linux/hrtimer.h>
90#include <linux/task_io_accounting.h> 90#include <linux/task_io_accounting.h>
91#include <linux/kobject.h>
92#include <linux/latencytop.h> 91#include <linux/latencytop.h>
93#include <linux/cred.h> 92#include <linux/cred.h>
94 93
@@ -435,6 +434,7 @@ extern int get_dumpable(struct mm_struct *mm);
435#endif 434#endif
436 /* leave room for more dump flags */ 435 /* leave room for more dump flags */
437#define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */ 436#define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */
437#define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */
438 438
439#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) 439#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK)
440 440
@@ -635,6 +635,8 @@ struct signal_struct {
635 635
636 int oom_adj; /* OOM kill score adjustment (bit shift) */ 636 int oom_adj; /* OOM kill score adjustment (bit shift) */
637 int oom_score_adj; /* OOM kill score adjustment */ 637 int oom_score_adj; /* OOM kill score adjustment */
638 int oom_score_adj_min; /* OOM kill score adjustment minimum value.
639 * Only settable by CAP_SYS_RESOURCE. */
638 640
639 struct mutex cred_guard_mutex; /* guard against foreign influences on 641 struct mutex cred_guard_mutex; /* guard against foreign influences on
640 * credential calculations 642 * credential calculations
@@ -685,7 +687,7 @@ struct user_struct {
685 atomic_t fanotify_listeners; 687 atomic_t fanotify_listeners;
686#endif 688#endif
687#ifdef CONFIG_EPOLL 689#ifdef CONFIG_EPOLL
688 atomic_t epoll_watches; /* The number of file descriptors currently watched */ 690 atomic_long_t epoll_watches; /* The number of file descriptors currently watched */
689#endif 691#endif
690#ifdef CONFIG_POSIX_MQUEUE 692#ifdef CONFIG_POSIX_MQUEUE
691 /* protected by mq_lock */ 693 /* protected by mq_lock */
@@ -1056,6 +1058,7 @@ struct sched_class {
1056 void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); 1058 void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags);
1057 void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); 1059 void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags);
1058 void (*yield_task) (struct rq *rq); 1060 void (*yield_task) (struct rq *rq);
1061 bool (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt);
1059 1062
1060 void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); 1063 void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags);
1061 1064
@@ -1082,12 +1085,10 @@ struct sched_class {
1082 void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); 1085 void (*task_tick) (struct rq *rq, struct task_struct *p, int queued);
1083 void (*task_fork) (struct task_struct *p); 1086 void (*task_fork) (struct task_struct *p);
1084 1087
1085 void (*switched_from) (struct rq *this_rq, struct task_struct *task, 1088 void (*switched_from) (struct rq *this_rq, struct task_struct *task);
1086 int running); 1089 void (*switched_to) (struct rq *this_rq, struct task_struct *task);
1087 void (*switched_to) (struct rq *this_rq, struct task_struct *task,
1088 int running);
1089 void (*prio_changed) (struct rq *this_rq, struct task_struct *task, 1090 void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
1090 int oldprio, int running); 1091 int oldprio);
1091 1092
1092 unsigned int (*get_rr_interval) (struct rq *rq, 1093 unsigned int (*get_rr_interval) (struct rq *rq,
1093 struct task_struct *task); 1094 struct task_struct *task);
@@ -1713,7 +1714,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
1713/* 1714/*
1714 * Per process flags 1715 * Per process flags
1715 */ 1716 */
1716#define PF_KSOFTIRQD 0x00000001 /* I am ksoftirqd */
1717#define PF_STARTING 0x00000002 /* being created */ 1717#define PF_STARTING 0x00000002 /* being created */
1718#define PF_EXITING 0x00000004 /* getting shut down */ 1718#define PF_EXITING 0x00000004 /* getting shut down */
1719#define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ 1719#define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */
@@ -1742,7 +1742,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
1742#define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ 1742#define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */
1743#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ 1743#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */
1744#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ 1744#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
1745#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ 1745#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */
1746#define PF_FREEZER_NOSIG 0x80000000 /* Freezer won't send signals to it */ 1746#define PF_FREEZER_NOSIG 0x80000000 /* Freezer won't send signals to it */
1747 1747
1748/* 1748/*
@@ -1943,8 +1943,6 @@ int sched_rt_handler(struct ctl_table *table, int write,
1943 void __user *buffer, size_t *lenp, 1943 void __user *buffer, size_t *lenp,
1944 loff_t *ppos); 1944 loff_t *ppos);
1945 1945
1946extern unsigned int sysctl_sched_compat_yield;
1947
1948#ifdef CONFIG_SCHED_AUTOGROUP 1946#ifdef CONFIG_SCHED_AUTOGROUP
1949extern unsigned int sysctl_sched_autogroup_enabled; 1947extern unsigned int sysctl_sched_autogroup_enabled;
1950 1948
@@ -1975,6 +1973,7 @@ static inline int rt_mutex_getprio(struct task_struct *p)
1975# define rt_mutex_adjust_pi(p) do { } while (0) 1973# define rt_mutex_adjust_pi(p) do { } while (0)
1976#endif 1974#endif
1977 1975
1976extern bool yield_to(struct task_struct *p, bool preempt);
1978extern void set_user_nice(struct task_struct *p, long nice); 1977extern void set_user_nice(struct task_struct *p, long nice);
1979extern int task_prio(const struct task_struct *p); 1978extern int task_prio(const struct task_struct *p);
1980extern int task_nice(const struct task_struct *p); 1979extern int task_nice(const struct task_struct *p);
@@ -2047,7 +2046,7 @@ extern void release_uids(struct user_namespace *ns);
2047 2046
2048#include <asm/current.h> 2047#include <asm/current.h>
2049 2048
2050extern void do_timer(unsigned long ticks); 2049extern void xtime_update(unsigned long ticks);
2051 2050
2052extern int wake_up_state(struct task_struct *tsk, unsigned int state); 2051extern int wake_up_state(struct task_struct *tsk, unsigned int state);
2053extern int wake_up_process(struct task_struct *tsk); 2052extern int wake_up_process(struct task_struct *tsk);
@@ -2511,7 +2510,7 @@ extern void normalize_rt_tasks(void);
2511 2510
2512#ifdef CONFIG_CGROUP_SCHED 2511#ifdef CONFIG_CGROUP_SCHED
2513 2512
2514extern struct task_group init_task_group; 2513extern struct task_group root_task_group;
2515 2514
2516extern struct task_group *sched_create_group(struct task_group *parent); 2515extern struct task_group *sched_create_group(struct task_group *parent);
2517extern void sched_destroy_group(struct task_group *tg); 2516extern void sched_destroy_group(struct task_group *tg);
@@ -2576,13 +2575,6 @@ static inline void inc_syscw(struct task_struct *tsk)
2576#define TASK_SIZE_OF(tsk) TASK_SIZE 2575#define TASK_SIZE_OF(tsk) TASK_SIZE
2577#endif 2576#endif
2578 2577
2579/*
2580 * Call the function if the target task is executing on a CPU right now:
2581 */
2582extern void task_oncpu_function_call(struct task_struct *p,
2583 void (*func) (void *info), void *info);
2584
2585
2586#ifdef CONFIG_MM_OWNER 2578#ifdef CONFIG_MM_OWNER
2587extern void mm_update_next_owner(struct mm_struct *mm); 2579extern void mm_update_next_owner(struct mm_struct *mm);
2588extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p); 2580extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p);