函数源码 |
Source File:fs\io_uring.c |
Create Date:2022-07-29 10:54:34 |
首页 | Copyright©Brick |
1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 | static unsigned io_cqring_events( struct io_ring_ctx *ctx, bool noflush) { struct io_rings *rings = ctx->rings; /* * noflush == true is from the waitqueue handler, just ensure we wake * up the task, and the next invocation will flush the entries. We * cannot safely to it from here. */ if (noflush && !list_empty(&ctx->cq_overflow_list)) return -1U; io_cqring_overflow_flush(ctx, false ); /* See comment at the top of this file */ smp_rmb(); return READ_ONCE(rings->cq.tail) - READ_ONCE(rings->cq.head); } |