Lines Matching defs:task_struct

6  * Define 'struct task_struct' and provide the main scheduler
50 /* task_struct member predeclarations (sorted alphabetically): */
80 struct task_struct;
253 * task when blocking on the lock is saved in task_struct::saved_state and
255 * serialized by task_struct::pi_lock against try_to_wake_up(). Any non RT
257 * redirected to operate on task_struct::saved_state to ensure that these
258 * are not dropped. On restore task_struct::saved_state is set to
596 typedef struct task_struct *(*dl_server_pick_f)(struct sched_dl_entity *);
748 struct task_struct {
752 * must be the first element of task_struct.
762 * This begins the randomizable portion of task_struct. Only
778 struct task_struct *last_wakee;
991 struct task_struct __rcu *real_parent;
994 struct task_struct __rcu *parent;
1001 struct task_struct *group_leader;
1152 struct task_struct *pi_top_task;
1482 struct task_struct *oom_reaper_list;
1554 * New fields for task_struct should be added above here, so that
1555 * they are included in the randomized portion of task_struct.
1564 * structure. It *MUST* be at the end of 'task_struct'.
1594 static inline unsigned int task_state_index(struct task_struct *tsk)
1608 static inline char task_state_to_char(struct task_struct *tsk)
1702 static inline bool task_##func(struct task_struct *p) \
1706 static inline void task_set_##func(struct task_struct *p) \
1710 static inline void task_clear_##func(struct task_struct *p) \
1750 extern int task_can_attach(struct task_struct *p);
1756 extern void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask);
1765 extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask);
1766 extern int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node);
1767 extern void release_user_cpus_ptr(struct task_struct *p);
1768 extern int dl_task_check_affinity(struct task_struct *p, const struct cpumask *mask);
1769 extern void force_compatible_cpus_allowed_ptr(struct task_struct *p);
1770 extern void relax_compatible_cpus_allowed_ptr(struct task_struct *p);
1772 static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
1775 static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
1781 static inline int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node)
1787 static inline void release_user_cpus_ptr(struct task_struct *p)
1792 static inline int dl_task_check_affinity(struct task_struct *p, const struct cpumask *mask)
1798 extern int yield_to(struct task_struct *p, bool preempt);
1799 extern void set_user_nice(struct task_struct *p, long nice);
1800 extern int task_prio(const struct task_struct *p);
1808 static inline int task_nice(const struct task_struct *p)
1813 extern int can_nice(const struct task_struct *p, const int nice);
1814 extern int task_curr(const struct task_struct *p);
1817 extern int sched_setscheduler(struct task_struct *, int, const struct sched_param *);
1818 extern int sched_setscheduler_nocheck(struct task_struct *, int, const struct sched_param *);
1819 extern void sched_set_fifo(struct task_struct *p);
1820 extern void sched_set_fifo_low(struct task_struct *p);
1821 extern void sched_set_normal(struct task_struct *p, int nice);
1822 extern int sched_setattr(struct task_struct *, const struct sched_attr *);
1823 extern int sched_setattr_nocheck(struct task_struct *, const struct sched_attr *);
1824 extern struct task_struct *idle_task(int cpu);
1832 static __always_inline bool is_idle_task(const struct task_struct *p)
1837 extern struct task_struct *curr_task(int cpu);
1838 extern void ia64_set_curr_task(int cpu, struct task_struct *p);
1843 struct task_struct task;
1873 extern struct task_struct *find_task_by_vpid(pid_t nr);
1874 extern struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns);
1879 extern struct task_struct *find_get_task_by_vpid(pid_t nr);
1881 extern int wake_up_state(struct task_struct *tsk, unsigned int state);
1882 extern int wake_up_process(struct task_struct *tsk);
1883 extern void wake_up_new_task(struct task_struct *tsk);
1886 extern void kick_process(struct task_struct *tsk);
1888 static inline void kick_process(struct task_struct *tsk) { }
1891 extern void __set_task_comm(struct task_struct *tsk, const char *from, bool exec);
1893 static inline void set_task_comm(struct task_struct *tsk, const char *from)
1898 extern char *__get_task_comm(char *to, size_t len, struct task_struct *tsk);
1918 extern unsigned long wait_task_inactive(struct task_struct *, unsigned int match_state);
1924 static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
1929 static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
1934 static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag,
1940 static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
1945 static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
1950 static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
1955 static inline void set_tsk_need_resched(struct task_struct *tsk)
1960 static inline void clear_tsk_need_resched(struct task_struct *tsk)
1965 static inline int test_tsk_need_resched(struct task_struct *tsk)
2114 static inline unsigned int task_cpu(const struct task_struct *p)
2119 extern void set_task_cpu(struct task_struct *p, unsigned int cpu);
2123 static inline unsigned int task_cpu(const struct task_struct *p)
2128 static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
2134 extern bool sched_task_on_rq(struct task_struct *p);
2135 extern unsigned long get_wchan(struct task_struct *p);
2136 extern struct task_struct *cpu_curr_snapshot(int cpu);
2163 static inline bool owner_on_cpu(struct task_struct *owner)
2177 extern void sched_core_free(struct task_struct *tsk);
2178 extern void sched_core_fork(struct task_struct *p);
2183 static inline void sched_core_free(struct task_struct *tsk) { }
2184 static inline void sched_core_fork(struct task_struct *p) { }
2188 extern void sched_set_stop_task(int cpu, struct task_struct *stop);