• Home
  • Raw
  • Download

Lines Matching defs:tsk

84 /* Used in tsk->state: */
90 /* Used in tsk->exit_state: */
94 /* Used in tsk->state again: */
1225 /* cg_list protected by css_set_lock and tsk->alloc_lock: */
1555 static inline pid_t task_pid_nr(struct task_struct *tsk)
1557 return tsk->pid;
1560 static inline pid_t task_pid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
1562 return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns);
1565 static inline pid_t task_pid_vnr(struct task_struct *tsk)
1567 return __task_pid_nr_ns(tsk, PIDTYPE_PID, NULL);
1571 static inline pid_t task_tgid_nr(struct task_struct *tsk)
1573 return tsk->tgid;
1591 static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
1593 return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns);
1596 static inline pid_t task_pgrp_vnr(struct task_struct *tsk)
1598 return __task_pid_nr_ns(tsk, PIDTYPE_PGID, NULL);
1602 static inline pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
1604 return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns);
1607 static inline pid_t task_session_vnr(struct task_struct *tsk)
1609 return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL);
1612 static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
1614 return __task_pid_nr_ns(tsk, PIDTYPE_TGID, ns);
1617 static inline pid_t task_tgid_vnr(struct task_struct *tsk)
1619 return __task_pid_nr_ns(tsk, PIDTYPE_TGID, NULL);
1622 static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns)
1627 if (pid_alive(tsk))
1628 pid = task_tgid_nr_ns(rcu_dereference(tsk->real_parent), ns);
1634 static inline pid_t task_ppid_nr(const struct task_struct *tsk)
1636 return task_ppid_nr_ns(tsk, &init_pid_ns);
1640 static inline pid_t task_pgrp_nr(struct task_struct *tsk)
1642 return task_pgrp_nr_ns(tsk, &init_pid_ns);
1648 static inline unsigned int task_state_index(struct task_struct *tsk)
1650 unsigned int tsk_state = READ_ONCE(tsk->__state);
1651 unsigned int state = (tsk_state | tsk->exit_state) & TASK_REPORT;
1678 static inline char task_state_to_char(struct task_struct *tsk)
1680 return task_index_to_char(task_state_index(tsk));
1686 * @tsk: Task structure to be checked.
1692 static inline int is_global_init(struct task_struct *tsk)
1694 return task_tgid_nr(tsk) == 1;
1732 * Only the _current_ task can read/write to tsk->flags, but other
1733 * tasks can access tsk->flags in readonly mode for example
1964 extern int wake_up_state(struct task_struct *tsk, unsigned int state);
1965 extern int wake_up_process(struct task_struct *tsk);
1966 extern void wake_up_new_task(struct task_struct *tsk);
1969 extern void kick_process(struct task_struct *tsk);
1971 static inline void kick_process(struct task_struct *tsk) { }
1974 extern void __set_task_comm(struct task_struct *tsk, const char *from, bool exec);
1976 static inline void set_task_comm(struct task_struct *tsk, const char *from)
1978 __set_task_comm(tsk, from, false);
1981 extern char *__get_task_comm(char *to, size_t len, struct task_struct *tsk);
1982 #define get_task_comm(buf, tsk) ({ \
1984 __get_task_comm(buf, sizeof(buf), tsk); \
2010 static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
2012 set_ti_thread_flag(task_thread_info(tsk), flag);
2015 static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
2017 clear_ti_thread_flag(task_thread_info(tsk), flag);
2020 static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag,
2023 update_ti_thread_flag(task_thread_info(tsk), flag, value);
2026 static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
2028 return test_and_set_ti_thread_flag(task_thread_info(tsk), flag);
2031 static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
2033 return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag);
2036 static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
2038 return test_ti_thread_flag(task_thread_info(tsk), flag);
2041 static inline void set_tsk_need_resched(struct task_struct *tsk)
2043 set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
2046 static inline void clear_tsk_need_resched(struct task_struct *tsk)
2048 clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
2051 static inline int test_tsk_need_resched(struct task_struct *tsk)
2053 return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED));
2208 #define TASK_SIZE_OF(tsk) TASK_SIZE
2351 extern void sched_core_free(struct task_struct *tsk);
2356 static inline void sched_core_free(struct task_struct *tsk) { }