Update to newer API

- Fixed buffers are now available through io_uring_register()
- Various thread/wq options are now dead and automatic instead
- sqe->index is now sqe->buf_index
- Fixed buffers require flag, not separate opcode

Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Jens Axboe
2019-01-10 14:28:10 -07:00
parent 6cdce17753
commit d5b4ae1c58
6 changed files with 43 additions and 23 deletions

View File

@@ -8,19 +8,26 @@
#if defined(__x86_64)
#ifndef __NR_sys_io_uring_setup
#define __NR_sys_io_uring_setup 335
#define __NR_sys_io_uring_setup 335
#endif
#ifndef __NR_sys_io_uring_enter
#define __NR_sys_io_uring_enter 336
#define __NR_sys_io_uring_enter 336
#endif
#ifndef __NR_sys_io_uring_register
#define __NR_sys_io_uring_register 337
#endif
#else
#error "Arch not supported yet"
#endif
int io_uring_setup(unsigned int entries, struct iovec *iovecs,
unsigned nr_iovecs, struct io_uring_params *p)
int io_uring_register(int fd, unsigned int opcode, void *arg)
{
return syscall(__NR_sys_io_uring_setup, entries, iovecs, nr_iovecs, p);
return syscall(__NR_sys_io_uring_register, fd, opcode, arg);
}
int io_uring_setup(unsigned int entries, struct io_uring_params *p)
{
return syscall(__NR_sys_io_uring_setup, entries, p);
}
int io_uring_enter(int fd, unsigned int to_submit, unsigned int min_complete,