History

Merge branch 'io_uring-5.8' into for-5.9/io_uring

Pull in task_work changes from the 5.8 series, as we'll need to apply the same kind of changes to other parts in the 5.9 branch. * io_uring-5.8: io_uring: fix regression with always ignoring signals in io_cqring_wait() io_uring: use signal based task_work running task_work: teach task_work_add() to do signal_wake_up()

Jens Axboe committed 6 years ago

Commit 58c6a582 parents 8eb06d7 b7db41c5 files · +65 −13Browse files

Showing the changes to include/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/sched/jobctl.h +3 −1
  2. include/linux/task_work.h +4 −1
include/linux/sched/jobctl.h+3−1
@@ -19,6 +19,7 @@ struct task_struct; · 18 unmodified lines
1919 #define JOBCTL_TRAPPING_BIT 21 /* switching to TRACED */
2020 #define JOBCTL_LISTENING_BIT 22 /* ptracer is listening for events */
2121 #define JOBCTL_TRAP_FREEZE_BIT 23 /* trap for cgroup freezer */
22+#define JOBCTL_TASK_WORK_BIT 24 /* set by TWA_SIGNAL */
2223
2324 #define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT)
2425 #define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT)
@@ -28,9 +29,10 @@ struct task_struct; · 3 unmodified lines
2829 #define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT)
2930 #define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT)
3031 #define JOBCTL_TRAP_FREEZE (1UL << JOBCTL_TRAP_FREEZE_BIT)
32+#define JOBCTL_TASK_WORK (1UL << JOBCTL_TASK_WORK_BIT)
3133
3234 #define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY)
33−#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK)
35+#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK | JOBCTL_TASK_WORK)
3436
3537 extern bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask);
3638 extern void task_clear_jobctl_trapping(struct task_struct *task);
include/linux/task_work.h+4−1
@@ -13,7 +13,10 @@ init_task_work(struct callback_head *twork, task_work_func_t func) · 12 unmodified lines
1313 twork->func = func;
1414 }
1515
16−int task_work_add(struct task_struct *task, struct callback_head *twork, bool);
16+#define TWA_RESUME 1
17+#define TWA_SIGNAL 2
18+int task_work_add(struct task_struct *task, struct callback_head *twork, int);
19+
1720 struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t);
1821 void task_work_run(void);
1922