Lines Matching refs:task_struct
186 extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m);
187 extern void proc_sched_set_task(struct task_struct *p);
319 struct task_struct;
327 extern asmlinkage void schedule_tail(struct task_struct *prev);
328 extern void init_idle(struct task_struct *idle, int cpu);
329 extern void init_idle_bootup_task(struct task_struct *idle);
365 extern void show_stack(struct task_struct *task, unsigned long *sp);
372 extern void sched_show_task(struct task_struct *p);
620 struct task_struct *curr_target;
633 struct task_struct *group_exit_task;
1104 extern void prefetch_stack(struct task_struct *t);
1106 static inline void prefetch_stack(struct task_struct *t) { } in prefetch_stack()
1293 struct task_struct { struct
1303 struct task_struct *last_wakee; argument
1406 struct task_struct __rcu *real_parent; /* real parent process */ argument
1407 struct task_struct __rcu *parent; /* recipient of SIGCHLD, wait4() reports */ argument
1413 struct task_struct *group_leader; /* threadgroup leader */ argument
1741 extern pid_t task_numa_group_id(struct task_struct *p);
1743 extern void task_numa_free(struct task_struct *p);
1744 extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page,
1751 static inline pid_t task_numa_group_id(struct task_struct *p) in task_numa_group_id()
1758 static inline void task_numa_free(struct task_struct *p) in task_numa_free()
1761 static inline bool should_numa_migrate_memory(struct task_struct *p, in should_numa_migrate_memory()
1768 static inline struct pid *task_pid(struct task_struct *task) in task_pid()
1773 static inline struct pid *task_tgid(struct task_struct *task) in task_tgid()
1783 static inline struct pid *task_pgrp(struct task_struct *task) in task_pgrp()
1788 static inline struct pid *task_session(struct task_struct *task) in task_session()
1808 pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
1811 static inline pid_t task_pid_nr(struct task_struct *tsk) in task_pid_nr()
1816 static inline pid_t task_pid_nr_ns(struct task_struct *tsk, in task_pid_nr_ns()
1822 static inline pid_t task_pid_vnr(struct task_struct *tsk) in task_pid_vnr()
1828 static inline pid_t task_tgid_nr(struct task_struct *tsk) in task_tgid_nr()
1833 pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns);
1835 static inline pid_t task_tgid_vnr(struct task_struct *tsk) in task_tgid_vnr()
1841 static inline int pid_alive(const struct task_struct *p);
1842 static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns) in task_ppid_nr_ns()
1854 static inline pid_t task_ppid_nr(const struct task_struct *tsk) in task_ppid_nr()
1859 static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, in task_pgrp_nr_ns()
1865 static inline pid_t task_pgrp_vnr(struct task_struct *tsk) in task_pgrp_vnr()
1871 static inline pid_t task_session_nr_ns(struct task_struct *tsk, in task_session_nr_ns()
1877 static inline pid_t task_session_vnr(struct task_struct *tsk) in task_session_vnr()
1883 static inline pid_t task_pgrp_nr(struct task_struct *tsk) in task_pgrp_nr()
1898 static inline int pid_alive(const struct task_struct *p) in pid_alive()
1911 static inline int is_global_init(struct task_struct *tsk) in is_global_init()
1918 extern void free_task(struct task_struct *tsk);
1921 extern void __put_task_struct(struct task_struct *t);
1923 static inline void put_task_struct(struct task_struct *t) in put_task_struct()
1930 extern void task_cputime(struct task_struct *t,
1932 extern void task_cputime_scaled(struct task_struct *t,
1934 extern cputime_t task_gtime(struct task_struct *t);
1936 static inline void task_cputime(struct task_struct *t, in task_cputime()
1945 static inline void task_cputime_scaled(struct task_struct *t, in task_cputime_scaled()
1955 static inline cputime_t task_gtime(struct task_struct *t) in task_gtime()
1960 extern void task_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st);
1961 extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st);
2048 static inline bool task_##func(struct task_struct *p) \
2051 static inline void task_set_##func(struct task_struct *p) \
2054 static inline void task_clear_##func(struct task_struct *p) \
2092 extern bool task_set_jobctl_pending(struct task_struct *task,
2094 extern void task_clear_jobctl_trapping(struct task_struct *task);
2095 extern void task_clear_jobctl_pending(struct task_struct *task,
2098 static inline void rcu_copy_process(struct task_struct *p) in rcu_copy_process()
2113 static inline void tsk_restore_flags(struct task_struct *task, in tsk_restore_flags()
2122 extern int task_can_attach(struct task_struct *p,
2125 extern void do_set_cpus_allowed(struct task_struct *p,
2128 extern int set_cpus_allowed_ptr(struct task_struct *p,
2131 static inline void do_set_cpus_allowed(struct task_struct *p, in do_set_cpus_allowed()
2135 static inline int set_cpus_allowed_ptr(struct task_struct *p, in set_cpus_allowed_ptr()
2153 static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) in set_cpus_allowed()
2221 task_sched_runtime(struct task_struct *task);
2253 extern void sched_autogroup_create_attach(struct task_struct *p);
2254 extern void sched_autogroup_detach(struct task_struct *p);
2258 extern void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m);
2259 extern int proc_sched_autogroup_set_nice(struct task_struct *p, int nice);
2262 static inline void sched_autogroup_create_attach(struct task_struct *p) { } in sched_autogroup_create_attach()
2263 static inline void sched_autogroup_detach(struct task_struct *p) { } in sched_autogroup_detach()
2268 extern int yield_to(struct task_struct *p, bool preempt);
2269 extern void set_user_nice(struct task_struct *p, long nice);
2270 extern int task_prio(const struct task_struct *p);
2277 static inline int task_nice(const struct task_struct *p) in task_nice()
2281 extern int can_nice(const struct task_struct *p, const int nice);
2282 extern int task_curr(const struct task_struct *p);
2284 extern int sched_setscheduler(struct task_struct *, int,
2286 extern int sched_setscheduler_nocheck(struct task_struct *, int,
2288 extern int sched_setattr(struct task_struct *,
2290 extern struct task_struct *idle_task(int cpu);
2297 static inline bool is_idle_task(const struct task_struct *p) in is_idle_task()
2301 extern struct task_struct *curr_task(int cpu);
2302 extern void set_curr_task(int cpu, struct task_struct *p);
2322 extern struct task_struct init_task;
2339 extern struct task_struct *find_task_by_vpid(pid_t nr);
2340 extern struct task_struct *find_task_by_pid_ns(pid_t nr,
2356 extern int wake_up_state(struct task_struct *tsk, unsigned int state);
2357 extern int wake_up_process(struct task_struct *tsk);
2358 extern void wake_up_new_task(struct task_struct *tsk);
2360 extern void kick_process(struct task_struct *tsk);
2362 static inline void kick_process(struct task_struct *tsk) { } in kick_process()
2364 extern int sched_fork(unsigned long clone_flags, struct task_struct *p);
2365 extern void sched_dead(struct task_struct *p);
2368 extern void flush_signals(struct task_struct *);
2369 extern void __flush_signals(struct task_struct *);
2370 extern void ignore_signals(struct task_struct *);
2371 extern void flush_signal_handlers(struct task_struct *, int force_default);
2372 extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
2374 static inline int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) in dequeue_signal_lock()
2389 extern void release_task(struct task_struct * p);
2390 extern int send_sig_info(int, struct siginfo *, struct task_struct *);
2391 extern int force_sigsegv(int, struct task_struct *);
2392 extern int force_sig_info(int, struct siginfo *, struct task_struct *);
2400 extern __must_check bool do_notify_parent(struct task_struct *, int);
2401 extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent);
2402 extern void force_sig(int, struct task_struct *);
2403 extern int send_sig(int, struct task_struct *, int);
2404 extern int zap_other_threads(struct task_struct *p);
2407 extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group);
2483 extern struct mm_struct *get_task_mm(struct task_struct *task);
2489 extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode);
2491 extern void mm_release(struct task_struct *, struct mm_struct *);
2494 struct task_struct *);
2498 extern void exit_files(struct task_struct *);
2514 struct task_struct *fork_idle(int);
2517 extern void __set_task_comm(struct task_struct *tsk, const char *from, bool exec);
2518 static inline void set_task_comm(struct task_struct *tsk, const char *from) in set_task_comm()
2522 extern char *get_task_comm(char *to, struct task_struct *tsk);
2526 extern unsigned long wait_task_inactive(struct task_struct *, long match_state);
2529 static inline unsigned long wait_task_inactive(struct task_struct *p, in wait_task_inactive()
2537 list_entry_rcu((p)->tasks.next, struct task_struct, tasks)
2564 static inline int get_nr_threads(struct task_struct *tsk) in get_nr_threads()
2569 static inline bool thread_group_leader(struct task_struct *p) in thread_group_leader()
2580 static inline bool has_group_leader_pid(struct task_struct *p) in has_group_leader_pid()
2586 bool same_thread_group(struct task_struct *p1, struct task_struct *p2) in same_thread_group()
2591 static inline struct task_struct *next_thread(const struct task_struct *p) in next_thread()
2594 struct task_struct, thread_group); in next_thread()
2597 static inline int thread_group_empty(struct task_struct *p) in thread_group_empty()
2615 static inline void task_lock(struct task_struct *p) in task_lock()
2620 static inline void task_unlock(struct task_struct *p) in task_unlock()
2625 extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
2628 static inline struct sighand_struct *lock_task_sighand(struct task_struct *tsk, in lock_task_sighand()
2638 static inline void unlock_task_sighand(struct task_struct *tsk, in unlock_task_sighand()
2645 static inline void threadgroup_change_begin(struct task_struct *tsk) in threadgroup_change_begin()
2649 static inline void threadgroup_change_end(struct task_struct *tsk) in threadgroup_change_end()
2670 static inline void threadgroup_lock(struct task_struct *tsk) in threadgroup_lock()
2681 static inline void threadgroup_unlock(struct task_struct *tsk) in threadgroup_unlock()
2686 static inline void threadgroup_change_begin(struct task_struct *tsk) {} in threadgroup_change_begin()
2687 static inline void threadgroup_change_end(struct task_struct *tsk) {} in threadgroup_change_end()
2688 static inline void threadgroup_lock(struct task_struct *tsk) {} in threadgroup_lock()
2689 static inline void threadgroup_unlock(struct task_struct *tsk) {} in threadgroup_unlock()
2697 static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) in setup_thread_stack()
2712 static inline unsigned long *end_of_stack(struct task_struct *p) in end_of_stack()
2735 static inline unsigned long stack_not_used(struct task_struct *p) in stack_not_used()
2746 extern void set_task_stack_end_magic(struct task_struct *tsk);
2751 static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) in set_tsk_thread_flag()
2756 static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag) in clear_tsk_thread_flag()
2761 static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) in test_and_set_tsk_thread_flag()
2766 static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) in test_and_clear_tsk_thread_flag()
2771 static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) in test_tsk_thread_flag()
2776 static inline void set_tsk_need_resched(struct task_struct *tsk) in set_tsk_need_resched()
2781 static inline void clear_tsk_need_resched(struct task_struct *tsk) in clear_tsk_need_resched()
2786 static inline int test_tsk_need_resched(struct task_struct *tsk) in test_tsk_need_resched()
2797 static inline int signal_pending(struct task_struct *p) in signal_pending()
2802 static inline int __fatal_signal_pending(struct task_struct *p) in __fatal_signal_pending()
2807 static inline int fatal_signal_pending(struct task_struct *p) in fatal_signal_pending()
2812 static inline int signal_pending_state(long state, struct task_struct *p) in signal_pending_state()
2878 static inline int tsk_is_polling(struct task_struct *p) in tsk_is_polling()
2920 static inline int tsk_is_polling(struct task_struct *p) { return 0; } in tsk_is_polling()
2957 void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times);
2958 void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times);
2971 extern void recalc_sigpending_and_wake(struct task_struct *t);
2974 extern void signal_wake_up_state(struct task_struct *t, unsigned int state);
2976 static inline void signal_wake_up(struct task_struct *t, bool resume) in signal_wake_up()
2980 static inline void ptrace_signal_wake_up(struct task_struct *t, bool resume) in ptrace_signal_wake_up()
2990 static inline unsigned int task_cpu(const struct task_struct *p) in task_cpu()
2995 static inline int task_node(const struct task_struct *p) in task_node()
3000 extern void set_task_cpu(struct task_struct *p, unsigned int cpu);
3004 static inline unsigned int task_cpu(const struct task_struct *p) in task_cpu()
3009 static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) in set_task_cpu()
3023 struct task_struct *tsk);
3026 static inline void add_rchar(struct task_struct *tsk, ssize_t amt) in add_rchar()
3031 static inline void add_wchar(struct task_struct *tsk, ssize_t amt) in add_wchar()
3036 static inline void inc_syscr(struct task_struct *tsk) in inc_syscr()
3041 static inline void inc_syscw(struct task_struct *tsk) in inc_syscw()
3046 static inline void add_rchar(struct task_struct *tsk, ssize_t amt) in add_rchar()
3050 static inline void add_wchar(struct task_struct *tsk, ssize_t amt) in add_wchar()
3054 static inline void inc_syscr(struct task_struct *tsk) in inc_syscr()
3058 static inline void inc_syscw(struct task_struct *tsk) in inc_syscw()
3075 static inline unsigned long task_rlimit(const struct task_struct *tsk, in task_rlimit()
3081 static inline unsigned long task_rlimit_max(const struct task_struct *tsk, in task_rlimit_max()