|
|
|
|
|
|
|
|
iouring_sqe_get (EV_P) |
|
|
iouring_sqe_get (EV_P) |
|
|
{ |
|
|
{ |
|
|
unsigned tail; |
|
|
unsigned tail; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (;;) |
|
|
for (;;) |
|
|
{ |
|
|
{ |
|
|
tail = EV_SQ_VAR (tail); |
|
|
tail = EV_SQ_VAR (tail); |
|
|
|
|
|
|
|
|
EV_SQ_ARRAY [idx] = idx; |
|
|
EV_SQ_ARRAY [idx] = idx; |
|
|
ECB_MEMORY_FENCE_RELEASE; |
|
|
ECB_MEMORY_FENCE_RELEASE; |
|
|
++EV_SQ_VAR (tail); |
|
|
++EV_SQ_VAR (tail); |
|
|
/*ECB_MEMORY_FENCE_RELEASE; /* for the time being we assume this is not needed */ |
|
|
|
|
|
|
|
|
// ECB_MEMORY_FENCE_RELEASE; /* for the time being we assume this is not needed */ |
|
|
++iouring_to_submit; |
|
|
++iouring_to_submit; |
|
|
|
|
|
return sqe; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/*****************************************************************************/ |
|
|
/*****************************************************************************/ |
|
|
|
|
|
|
|
|
ev_ref (EV_A); |
|
|
ev_ref (EV_A); |
|
|
ev_io_stop (EV_A_ &iouring_tfd_w); |
|
|
ev_io_stop (EV_A_ &iouring_tfd_w); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ecb_cold |
|
|
ecb_cold |
|
|
|
|
|
|
|
|
iouring_handle_cq (EV_P) |
|
|
iouring_handle_cq (EV_P) |
|
|
{ |
|
|
{ |
|
|
unsigned head, tail, mask; |
|
|
unsigned head, tail, mask; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
head = EV_CQ_VAR (head); |
|
|
head = EV_CQ_VAR (head); |
|
|
ECB_MEMORY_FENCE_ACQUIRE; |
|
|
ECB_MEMORY_FENCE_ACQUIRE; |
|
|
tail = EV_CQ_VAR (tail); |
|
|
tail = EV_CQ_VAR (tail); |