summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-10-14 13:52:39 +0300
committerPeter Zijlstra <peterz@infradead.org>2024-10-14 13:52:39 +0300
commit3144c83dcc9385c0b3291d36f3231411f5efdb40 (patch)
treee0797d11a9393a4dbf2c15680d8b5642cf135b9a /include/linux
parent7266f0a6d3bb73f42ea06656d3cc48c7d0386f71 (diff)
parentcd9626e9ebc77edec33023fe95dab4b04ffc819d (diff)
downloadlinux-3144c83dcc9385c0b3291d36f3231411f5efdb40.tar.xz
Merge branch 'tip/sched/urgent'
Sync with sched/urgent to avoid conflicts. Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h5
-rw-r--r--include/linux/task_work.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index abf26f1e1447..8b62e7413b20 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2133,6 +2133,11 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
#endif /* CONFIG_SMP */
+static inline bool task_is_runnable(struct task_struct *p)
+{
+ return p->on_rq && !p->se.sched_delayed;
+}
+
extern bool sched_task_on_rq(struct task_struct *p);
extern unsigned long get_wchan(struct task_struct *p);
extern struct task_struct *cpu_curr_snapshot(int cpu);
diff --git a/include/linux/task_work.h b/include/linux/task_work.h
index cf5e7e891a77..2964171856e0 100644
--- a/include/linux/task_work.h
+++ b/include/linux/task_work.h
@@ -14,11 +14,14 @@ init_task_work(struct callback_head *twork, task_work_func_t func)
}
enum task_work_notify_mode {
- TWA_NONE,
+ TWA_NONE = 0,
TWA_RESUME,
TWA_SIGNAL,
TWA_SIGNAL_NO_IPI,
TWA_NMI_CURRENT,
+
+ TWA_FLAGS = 0xff00,
+ TWAF_NO_ALLOC = 0x0100,
};
static inline bool task_work_pending(struct task_struct *task)