Add TIMEOUT support

Add support for the current TIMEOUT variant. This allows passing
in a timeout and event count, first of which will trigger the
completion of the timeout command.

If the timeout is hit, the command completes with cqe->res == -ETIME.
If the asked number of events complete first, the command completes
with cqe->res == 0.

test/timeout.c tests a variety of timeout conditions.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
4 files changed