io_uring_submit: fix head/tail wrap issue

Use proper unsigned math to figure out how many entries we have. If
we have head and tail on either side of UINT_MAX, then we currently
don't submit anything as:

while (head < tail) {

is never true.

Reported-by: Weiping Zhang <zhangweiping@didiglobal.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 file changed
tree: 279ca85d251172bbe64c7189ab4f47a0014dd0e3
  1. examples/
  2. man/
  3. src/
  4. test/
  5. .gitignore
  6. configure
  7. COPYING
  8. liburing.spec
  9. Makefile