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
19#define JOBCTL_TRAPPING_BIT 21 /* switching to TRACED */19#define JOBCTL_TRAPPING_BIT 21 /* switching to TRACED */
20#define JOBCTL_LISTENING_BIT 22 /* ptracer is listening for events */20#define JOBCTL_LISTENING_BIT 22 /* ptracer is listening for events */
21#define JOBCTL_TRAP_FREEZE_BIT 23 /* trap for cgroup freezer */21#define JOBCTL_TRAP_FREEZE_BIT 23 /* trap for cgroup freezer */
22#define JOBCTL_TASK_WORK_BIT 24 /* set by TWA_SIGNAL */
22 23
23#define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT)24#define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT)
24#define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT)25#define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT)
@@ -28,9 +29,10 @@ struct task_struct; · 3 unmodified lines
28#define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT)29#define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT)
29#define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT)30#define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT)
30#define JOBCTL_TRAP_FREEZE (1UL << JOBCTL_TRAP_FREEZE_BIT)31#define JOBCTL_TRAP_FREEZE (1UL << JOBCTL_TRAP_FREEZE_BIT)
32#define JOBCTL_TASK_WORK (1UL << JOBCTL_TASK_WORK_BIT)
31 33
32#define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY)34#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)
34 36
35extern bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask);37extern bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask);
36extern void task_clear_jobctl_trapping(struct task_struct *task);38extern 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
13 twork->func = func;13 twork->func = func;
14}14}
15 15
16int task_work_add(struct task_struct *task, struct callback_head *twork, bool);16#define TWA_RESUME 1
17#define TWA_SIGNAL 2
18int task_work_add(struct task_struct *task, struct callback_head *twork, int);
19
17struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t);20struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t);
18void task_work_run(void);21void task_work_run(void);
19 22