Commit Graph

105 Commits

Author SHA1 Message Date
Jens Axboe
357ca59684 Add sample 'cp' program
Don't rely on this for anything, it's just a test case / demo.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:41:14 -07:00
Jens Axboe
7f7a66e385 Change API to provide io_uring struct abstraction
This is cleaner than having the app juggle an SQ and CQ ring,
just wrap them in struct io_uring and have the API always take
that. This means the app doesn't need to worry about the different
types of rings, and that we only need to pass in one argument
for setup/teardown.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:38:05 -07:00
Jens Axboe
f47f24cea7 liburing: add io_uring_iocb_from_ev() helper
Returns the iocb associated with a completion event.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:38:03 -07:00
Jens Axboe
6a44c6e0f7 Add option for getting a completion without waiting
This now exposes two helpers:

io_uring_get_completion()
	Return a completion, if we have one (or more) available in
	the ring

io_uring_wait_completion()
	Return a completion, waiting for it if necessary

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:38:01 -07:00
Jens Axboe
f93c84e1b0 Initial commit
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 07:38:15 -07:00