Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 
0003 struct io_sq_data {
0004     refcount_t      refs;
0005     atomic_t        park_pending;
0006     struct mutex        lock;
0007 
0008     /* ctx's that are using this sqd */
0009     struct list_head    ctx_list;
0010 
0011     struct task_struct  *thread;
0012     struct wait_queue_head  wait;
0013 
0014     unsigned        sq_thread_idle;
0015     int         sq_cpu;
0016     pid_t           task_pid;
0017     pid_t           task_tgid;
0018 
0019     unsigned long       state;
0020     struct completion   exited;
0021 };
0022 
0023 int io_sq_offload_create(struct io_ring_ctx *ctx, struct io_uring_params *p);
0024 void io_sq_thread_finish(struct io_ring_ctx *ctx);
0025 void io_sq_thread_stop(struct io_sq_data *sqd);
0026 void io_sq_thread_park(struct io_sq_data *sqd);
0027 void io_sq_thread_unpark(struct io_sq_data *sqd);
0028 void io_put_sq_data(struct io_sq_data *sqd);
0029 int io_sqpoll_wait_sq(struct io_ring_ctx *ctx);