@@ -46,13 +46,23 @@ int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw,
46
46
struct iov_iter * iter , void * ioucmd );
47
47
void io_uring_cmd_done (struct io_uring_cmd * cmd , ssize_t ret , ssize_t res2 ,
48
48
unsigned issue_flags );
49
- void io_uring_cmd_complete_in_task (struct io_uring_cmd * ioucmd ,
50
- void (* task_work_cb )(struct io_uring_cmd * , unsigned ));
51
49
struct sock * io_uring_get_socket (struct file * file );
52
50
void __io_uring_cancel (bool cancel_all );
53
51
void __io_uring_free (struct task_struct * tsk );
54
52
void io_uring_unreg_ringfd (void );
55
53
const char * io_uring_get_opcode (u8 opcode );
54
+ void __io_uring_cmd_do_in_task (struct io_uring_cmd * ioucmd ,
55
+ void (* task_work_cb )(struct io_uring_cmd * , unsigned ),
56
+ unsigned flags );
57
+ /* users should follow semantics of IOU_F_TWQ_LAZY_WAKE */
58
+ void io_uring_cmd_do_in_task_lazy (struct io_uring_cmd * ioucmd ,
59
+ void (* task_work_cb )(struct io_uring_cmd * , unsigned ));
60
+
61
+ static inline void io_uring_cmd_complete_in_task (struct io_uring_cmd * ioucmd ,
62
+ void (* task_work_cb )(struct io_uring_cmd * , unsigned ))
63
+ {
64
+ __io_uring_cmd_do_in_task (ioucmd , task_work_cb , 0 );
65
+ }
56
66
57
67
static inline void io_uring_files_cancel (void )
58
68
{
@@ -85,6 +95,10 @@ static inline void io_uring_cmd_complete_in_task(struct io_uring_cmd *ioucmd,
85
95
void (* task_work_cb )(struct io_uring_cmd * , unsigned ))
86
96
{
87
97
}
98
+ static inline void io_uring_cmd_do_in_task_lazy (struct io_uring_cmd * ioucmd ,
99
+ void (* task_work_cb )(struct io_uring_cmd * , unsigned ))
100
+ {
101
+ }
88
102
static inline struct sock * io_uring_get_socket (struct file * file )
89
103
{
90
104
return NULL ;
0 commit comments