| /linux/arch/parisc/kernel/ |
| H A D | asm-offsets.c | 43 DEFINE(TASK_TI_FLAGS, offsetof(struct task_struct, thread_info.flags)); in main() 45 DEFINE(TASK_TI_CPU, offsetof(struct task_struct, thread_info.cpu)); in main() 47 DEFINE(TASK_STACK, offsetof(struct task_struct, stack)); in main() 48 DEFINE(TASK_PAGEFAULT_DISABLED, offsetof(struct task_struct, pagefault_disabled)); in main() 50 DEFINE(TASK_REGS, offsetof(struct task_struct, thread.regs)); in main() 51 DEFINE(TASK_PT_PSW, offsetof(struct task_struct, thread.regs.gr[ 0])); in main() 52 DEFINE(TASK_PT_GR1, offsetof(struct task_struct, thread.regs.gr[ 1])); in main() 53 DEFINE(TASK_PT_GR2, offsetof(struct task_struct, thread.regs.gr[ 2])); in main() 54 DEFINE(TASK_PT_GR3, offsetof(struct task_struct, thread.regs.gr[ 3])); in main() 55 DEFINE(TASK_PT_GR4, offsetof(struct task_struct, thread.regs.gr[ 4])); in main() [all …]
|
| /linux/include/linux/ |
| H A D | vtime.h | 12 extern void vtime_account_kernel(struct task_struct *tsk); 13 extern void vtime_account_idle(struct task_struct *tsk); 17 extern void vtime_user_enter(struct task_struct *tsk); 18 extern void vtime_user_exit(struct task_struct *tsk); 19 extern void vtime_guest_enter(struct task_struct *tsk); 20 extern void vtime_guest_exit(struct task_struct *tsk); 21 extern void vtime_init_idle(struct task_struct *tsk, int cpu); 23 static inline void vtime_user_enter(struct task_struct *tsk) { } in vtime_user_enter() 24 static inline void vtime_user_exit(struct task_struct *tsk) { } in vtime_user_exit() 25 static inline void vtime_guest_enter(struct task_struct *tsk) { } in vtime_guest_enter() [all …]
|
| H A D | cn_proc.h | 23 void proc_fork_connector(struct task_struct *task); 24 void proc_exec_connector(struct task_struct *task); 25 void proc_id_connector(struct task_struct *task, int which_id); 26 void proc_sid_connector(struct task_struct *task); 27 void proc_ptrace_connector(struct task_struct *task, int which_id); 28 void proc_comm_connector(struct task_struct *task); 29 void proc_coredump_connector(struct task_struct *task); 30 void proc_exit_connector(struct task_struct *task); 32 static inline void proc_fork_connector(struct task_struct *task) in proc_fork_connector() 35 static inline void proc_exec_connector(struct task_struct *task) in proc_exec_connector() [all …]
|
| H A D | kthread.h | 21 static inline struct kthread *tsk_is_kthread(struct task_struct *p) in tsk_is_kthread() 29 struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), 49 struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data), 54 void get_kthread_comm(char *buf, size_t buf_size, struct task_struct *tsk); 55 bool set_kthread_struct(struct task_struct *p); 57 void kthread_set_per_cpu(struct task_struct *k, int cpu); 58 bool kthread_is_per_cpu(struct task_struct *k); 71 struct task_struct *__k \ 90 static inline struct task_struct * 94 struct task_struct *p; in kthread_run_on_cpu() [all …]
|
| H A D | tsacct_kern.h | 16 struct taskstats *stats, struct task_struct *tsk); 20 struct taskstats *stats, struct task_struct *tsk) in bacct_add_tsk() 25 extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p); 26 extern void acct_update_integrals(struct task_struct *tsk); 27 extern void acct_account_cputime(struct task_struct *tsk); 28 extern void acct_clear_integrals(struct task_struct *tsk); 30 static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p) in xacct_add_tsk() 32 static inline void acct_update_integrals(struct task_struct *tsk) in acct_update_integrals() 34 static inline void acct_account_cputime(struct task_struct *tsk) in acct_account_cputime() 36 static inline void acct_clear_integrals(struct task_struct *tsk) in acct_clear_integrals()
|
| H A D | cpuset.h | 75 extern void inc_dl_tasks_cs(struct task_struct *task); 76 extern void dec_dl_tasks_cs(struct task_struct *task); 80 extern void cpuset_cpus_allowed_locked(struct task_struct *p, struct cpumask *mask); 81 extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); 82 extern bool cpuset_cpus_allowed_fallback(struct task_struct *p); 83 extern nodemask_t cpuset_mems_allowed(struct task_struct *p); 102 extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1, 103 const struct task_struct *tsk2); 118 struct task_struct *task); 120 struct pid *pid, struct task_struct *tsk); [all …]
|
| H A D | sched.h | 6 * Define 'struct task_struct' and provide the main scheduler 57 /* task_struct member predeclarations (sorted alphabetically): */ 89 struct task_struct; 275 * task when blocking on the lock is saved in task_struct::saved_state and 277 * serialized by task_struct::pi_lock against try_to_wake_up(). Any non RT 279 * redirected to operate on task_struct::saved_state to ensure that these 280 * are not dropped. On restore task_struct::saved_state is set to 353 extern void __trace_set_need_resched(struct task_struct *curr, int tif); 642 typedef struct task_struct *(*dl_server_pick_f)(struct sched_dl_entity *, struct rq_flags *rf); 820 struct task_struct { struct [all …]
|
| /linux/arch/powerpc/kernel/ptrace/ |
| H A D | ptrace-decl.h | 73 int fpr_set(struct task_struct *target, const struct user_regset *regset, 79 int vsr_active(struct task_struct *target, const struct user_regset *regset); 81 int vsr_set(struct task_struct *target, const struct user_regset *regset, 87 int vr_active(struct task_struct *target, const struct user_regset *regset); 89 int vr_set(struct task_struct *target, const struct user_regset *regset, 95 int evr_active(struct task_struct *target, const struct user_regset *regset); 97 int evr_set(struct task_struct *target, const struct user_regset *regset, 103 int gpr32_get_common(struct task_struct *target, 107 int gpr32_set_common(struct task_struct *target, 116 void flush_tmregs_to_thread(struct task_struct *tsk); [all …]
|
| /linux/arch/powerpc/include/asm/ |
| H A D | switch_to.h | 12 struct task_struct; 15 extern struct task_struct *__switch_to(struct task_struct *, 16 struct task_struct *); 19 extern struct task_struct *_switch(struct thread_struct *prev, 36 extern void flush_all_to_thread(struct task_struct *); 37 extern void giveup_all(struct task_struct *); 41 extern void flush_fp_to_thread(struct task_struct *); 42 extern void giveup_fpu(struct task_struct *); 43 extern void save_fpu(struct task_struct *); 49 static inline void save_fpu(struct task_struct *t) { } in save_fpu() [all …]
|
| /linux/arch/mips/kernel/ |
| H A D | asm-offsets.c | 3 * asm-offsets.c: Calculate pt_regs and task_struct offsets. 90 COMMENT("MIPS task_struct offsets."); in output_task_defines() 91 OFFSET(TASK_THREAD_INFO, task_struct, stack); in output_task_defines() 92 OFFSET(TASK_FLAGS, task_struct, flags); in output_task_defines() 93 OFFSET(TASK_MM, task_struct, mm); in output_task_defines() 94 OFFSET(TASK_PID, task_struct, pid); in output_task_defines() 96 OFFSET(TASK_STACK_CANARY, task_struct, stack_canary); in output_task_defines() 98 DEFINE(TASK_STRUCT_SIZE, sizeof(struct task_struct)); in output_task_defines() 124 OFFSET(THREAD_REG16, task_struct, thread.reg16); in output_thread_defines() 125 OFFSET(THREAD_REG17, task_struct, thread.reg17); in output_thread_defines() [all …]
|
| /linux/tools/testing/selftests/sched_ext/ |
| H A D | maximal.bpf.c | 17 s32 BPF_STRUCT_OPS(maximal_select_cpu, struct task_struct *p, s32 prev_cpu, in BPF_STRUCT_OPS() 23 void BPF_STRUCT_OPS(maximal_enqueue, struct task_struct *p, u64 enq_flags) in BPF_STRUCT_OPS() 28 void BPF_STRUCT_OPS(maximal_dequeue, struct task_struct *p, u64 deq_flags) in BPF_STRUCT_OPS() 31 void BPF_STRUCT_OPS(maximal_dispatch, s32 cpu, struct task_struct *prev) in BPF_STRUCT_OPS() 36 void BPF_STRUCT_OPS(maximal_runnable, struct task_struct *p, u64 enq_flags) in BPF_STRUCT_OPS() 39 void BPF_STRUCT_OPS(maximal_running, struct task_struct *p) in BPF_STRUCT_OPS() 42 void BPF_STRUCT_OPS(maximal_stopping, struct task_struct *p, bool runnable) in BPF_STRUCT_OPS() 45 void BPF_STRUCT_OPS(maximal_quiescent, struct task_struct *p, u64 deq_flags) in BPF_STRUCT_OPS() 48 bool BPF_STRUCT_OPS(maximal_yield, struct task_struct *from, in BPF_STRUCT_OPS() 49 struct task_struct *t in BPF_STRUCT_OPS() [all...] |
| /linux/arch/powerpc/kernel/ |
| H A D | signal.h | 10 void __user *get_sigframe(struct ksignal *ksig, struct task_struct *tsk, 14 struct task_struct *tsk); 17 struct task_struct *tsk); 36 struct task_struct *task); 38 struct task_struct *task); 39 extern unsigned long copy_vsx_from_user(struct task_struct *task, 41 extern unsigned long copy_ckvsx_from_user(struct task_struct *task, 43 unsigned long copy_fpr_to_user(void __user *to, struct task_struct *task); 44 unsigned long copy_ckfpr_to_user(void __user *to, struct task_struct *task); 45 unsigned long copy_fpr_from_user(struct task_struct *task, void __user *from); [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | task_kfunc_success.c | 18 * TP_PROTO(struct task_struct *p, u64 clone_flags) 21 struct task_struct *bpf_task_acquire(struct task_struct *p) __ksym __weak; 23 struct task_struct *bpf_task_acquire___one(struct task_struct *task) __ksym __weak; 25 struct task_struct *bpf_task_acquire___two(struct task_struct *p, void *ctx) __ksym __weak; 27 struct task_struct *bpf_task_acquire___three(void *ctx) __ksym __weak; 39 static int test_acquire_release(struct task_struct *task) in test_acquire_release() 41 struct task_struct *acquired = NULL; in test_acquire_release() 67 int BPF_PROG(test_task_kfunc_flavor_relo, struct task_struct *task, u64 clone_flags) in BPF_PROG() 69 struct task_struct *acquired = NULL; in BPF_PROG() 97 int BPF_PROG(test_task_kfunc_flavor_relo_not_found, struct task_struct *task, u64 clone_flags) in BPF_PROG() [all …]
|
| H A D | verifier_global_ptr_args.c | 12 extern struct task_struct *bpf_task_acquire(struct task_struct *p) __ksym __weak; 13 extern void bpf_task_release(struct task_struct *p) __ksym __weak; 15 __weak int subprog_trusted_task_nullable(struct task_struct *task __arg_trusted __arg_nullable) in subprog_trusted_task_nullable() 22 __weak int subprog_trusted_task_nullable_extra_layer(struct task_struct *task __arg_trusted __arg_nullable) in subprog_trusted_task_nullable_extra_layer() 33 struct task_struct *t1 = bpf_get_current_task_btf(); in trusted_task_arg_nullable() 34 struct task_struct *t2 = bpf_task_acquire(t1); in trusted_task_arg_nullable() 59 __weak int subprog_trusted_task_nonnull(struct task_struct *task __arg_trusted) in subprog_trusted_task_nonnull() 79 struct task_struct *t = bpf_get_current_task_btf(); in trusted_task_arg_nonnull_fail2() 80 struct task_struct *nullabl in trusted_task_arg_nonnull_fail2() [all...] |
| /linux/arch/riscv/include/asm/ |
| H A D | usercfi.h | 17 struct task_struct; 33 unsigned long shstk_alloc_thread_stack(struct task_struct *tsk, 35 void shstk_release(struct task_struct *tsk); 36 void set_shstk_base(struct task_struct *task, unsigned long shstk_addr, unsigned long size); 37 unsigned long get_shstk_base(struct task_struct *task, unsigned long *size); 38 void set_active_shstk(struct task_struct *task, unsigned long shstk_addr); 39 bool is_shstk_enabled(struct task_struct *task); 40 bool is_shstk_locked(struct task_struct *task); 41 bool is_shstk_allocated(struct task_struct *task); 42 void set_shstk_lock(struct task_struct *task, bool lock); [all …]
|
| H A D | switch_to.h | 19 extern void __fstate_save(struct task_struct *save_to); 20 extern void __fstate_restore(struct task_struct *restore_from); 27 static inline void fstate_off(struct task_struct *task, in fstate_off() 33 static inline void fstate_save(struct task_struct *task, in fstate_save() 42 static inline void fstate_restore(struct task_struct *task, in fstate_restore() 51 static inline void __switch_to_fpu(struct task_struct *prev, in __switch_to_fpu() 52 struct task_struct *next) in __switch_to_fpu() 73 static inline void envcfg_update_bits(struct task_struct *task, in envcfg_update_bits() 84 static inline void __switch_to_envcfg(struct task_struct *next) in __switch_to_envcfg() 91 extern struct task_struct *__switch_to(struct task_struct *, [all …]
|
| /linux/arch/loongarch/kernel/ |
| H A D | asm-offsets.c | 3 * asm-offsets.c: Calculate pt_regs and task_struct offsets. 71 COMMENT("LoongArch task_struct offsets."); in output_task_defines() 72 OFFSET(TASK_STATE, task_struct, __state); in output_task_defines() 73 OFFSET(TASK_THREAD_INFO, task_struct, stack); in output_task_defines() 74 OFFSET(TASK_FLAGS, task_struct, flags); in output_task_defines() 75 OFFSET(TASK_MM, task_struct, mm); in output_task_defines() 76 OFFSET(TASK_PID, task_struct, pid); in output_task_defines() 78 OFFSET(TASK_STACK_CANARY, task_struct, stack_canary); in output_task_defines() 80 DEFINE(TASK_STRUCT_SIZE, sizeof(struct task_struct)); in output_task_defines() 103 OFFSET(THREAD_REG01, task_struct, thread.reg01); in output_thread_defines() [all …]
|
| /linux/include/linux/sched/ |
| H A D | task_stack.h | 21 static __always_inline void *task_stack_page(const struct task_struct *task) in task_stack_page() 28 static __always_inline unsigned long *end_of_stack(const struct task_struct *task) in end_of_stack() 41 static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) in setup_thread_stack() 56 static inline unsigned long *end_of_stack(const struct task_struct *p) in end_of_stack() 68 static inline void *try_get_task_stack(struct task_struct *tsk) in try_get_task_stack() 74 extern void put_task_stack(struct task_struct *tsk); 76 static inline void *try_get_task_stack(struct task_struct *tsk) in try_get_task_stack() 81 static inline void put_task_stack(struct task_struct *tsk) {} in put_task_stack() 84 void exit_task_stack_account(struct task_struct *tsk); 100 unsigned long stack_not_used(struct task_struct *p); [all …]
|
| H A D | rt.h | 7 struct task_struct; 23 static inline bool rt_task(struct task_struct *p) in rt_task() 33 static inline bool rt_or_dl_task(struct task_struct *p) in rt_or_dl_task() 42 static inline bool rt_or_dl_task_policy(struct task_struct *tsk) in rt_or_dl_task_policy() 61 static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *p) in rt_mutex_get_top_task() 65 extern void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task); 66 extern void rt_mutex_adjust_pi(struct task_struct *p); 68 static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task) in rt_mutex_get_top_task()
|
| H A D | autogroup.h | 6 struct task_struct; 11 extern void sched_autogroup_create_attach(struct task_struct *p); 12 extern void sched_autogroup_detach(struct task_struct *p); 15 extern void sched_autogroup_exit_task(struct task_struct *p); 17 extern void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m); 18 extern int proc_sched_autogroup_set_nice(struct task_struct *p, int nice); 21 static inline void sched_autogroup_create_attach(struct task_struct *p) { } in sched_autogroup_create_attach() 22 static inline void sched_autogroup_detach(struct task_struct *p) { } in sched_autogroup_detach() 25 static inline void sched_autogroup_exit_task(struct task_struct *p) { } in sched_autogroup_exit_task()
|
| /linux/arch/loongarch/include/asm/ |
| H A D | fpu.h | 51 static inline void save_lsx(struct task_struct *t); 52 static inline void restore_lsx(struct task_struct *t); 56 static inline void save_lasx(struct task_struct *t); 57 static inline void restore_lasx(struct task_struct *t); 132 static inline void lose_fpu_inatomic(int save, struct task_struct *tsk) in lose_fpu_inatomic() 172 static inline void save_fp(struct task_struct *tsk) in save_fp() 178 static inline void restore_fp(struct task_struct *tsk) in restore_fp() 184 static inline void save_fpu_regs(struct task_struct *tsk) in save_fpu_regs() 229 static inline void save_lsx(struct task_struct *t) in save_lsx() 235 static inline void restore_lsx(struct task_struct *t) in restore_lsx() [all …]
|
| /linux/arch/csky/include/asm/ |
| H A D | switch_to.h | 9 static inline void __switch_to_fpu(struct task_struct *prev, in __switch_to_fpu() 10 struct task_struct *next) in __switch_to_fpu() 16 static inline void __switch_to_fpu(struct task_struct *prev, in __switch_to_fpu() 17 struct task_struct *next) in __switch_to_fpu() 24 extern struct task_struct *__switch_to(struct task_struct *, 25 struct task_struct *); 29 struct task_struct *__prev = (prev); \ 30 struct task_struct *__next = (next); \
|
| /linux/lib/kunit/ |
| H A D | try-catch.c | 40 struct task_struct *task_struct; in kunit_try_catch_run() local 46 task_struct = kthread_create(kunit_generic_run_threadfn_adapter, in kunit_try_catch_run() 48 if (IS_ERR(task_struct)) { in kunit_try_catch_run() 49 try_catch->try_result = PTR_ERR(task_struct); in kunit_try_catch_run() 53 get_task_struct(task_struct); in kunit_try_catch_run() 55 * As for a vfork(2), task_struct->vfork_done (pointing to the in kunit_try_catch_run() 60 task_done = task_struct->vfork_done; in kunit_try_catch_run() 61 wake_up_process(task_struct); in kunit_try_catch_run() 67 kthread_stop(task_struct); in kunit_try_catch_run() 70 put_task_struct(task_struct); in kunit_try_catch_run()
|
| /linux/security/yama/ |
| H A D | yama_lsm.c | 32 struct task_struct *tracer; 33 struct task_struct *tracee; 48 struct task_struct *target; 49 struct task_struct *agent; 75 static void report_access(const char *access, struct task_struct *target, in report_access() 76 struct task_struct *agent) in report_access() 133 * @tracer: the task_struct of the process doing the ptrace 134 * @tracee: the task_struct of the process to be ptraced 141 static int yama_ptracer_add(struct task_struct *tracer, in yama_ptracer_add() 142 struct task_struct *tracee) in yama_ptracer_add() [all …]
|
| /linux/tools/sched_ext/include/scx/ |
| H A D | compat.bpf.h | 19 struct cgroup *scx_bpf_task_cgroup___new(struct task_struct *p) __ksym __weak; 38 bool scx_bpf_dsq_move___new(struct bpf_iter_scx_dsq *it__iter, struct task_struct *p, u64 dsq_id, u64 enq_flags) __ksym __weak; 39 bool scx_bpf_dsq_move_vtime___new(struct bpf_iter_scx_dsq *it__iter, struct task_struct *p, u64 dsq_id, u64 enq_flags) __ksym __weak; 44 bool scx_bpf_dispatch_from_dsq___old(struct bpf_iter_scx_dsq *it__iter, struct task_struct *p, u64 dsq_id, u64 enq_flags) __ksym __weak; 45 bool scx_bpf_dispatch_vtime_from_dsq___old(struct bpf_iter_scx_dsq *it__iter, struct task_struct *p, u64 dsq_id, u64 enq_flags) __ksym __weak; 98 static inline struct task_struct *__COMPAT_scx_bpf_dsq_peek(u64 dsq_id) in __COMPAT_scx_bpf_dsq_peek() 100 struct task_struct *p = NULL; in __COMPAT_scx_bpf_dsq_peek() 229 static inline struct task_struct *__COMPAT_scx_bpf_cpu_curr(int cpu) 253 s32 scx_bpf_select_cpu_and___compat(struct task_struct *p, s32 prev_cpu, u64 wake_flags, in scx_bpf_select_cpu_and() 255 void scx_bpf_dispatch_vtime___compat(struct task_struct * in scx_bpf_select_cpu_and() [all...] |