summaryrefslogtreecommitdiff
path: root/test/poll-cancel.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-17 14:24:28 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-17 14:24:28 -0700
commit768d4559d0078e70426ef08e0f8dfc0da0ece4d5 (patch)
tree1477de7e32d378d7ad126890adab57343d873abd /test/poll-cancel.c
parent79a7d3a3f6710dc257dfb2095d5d91d73d0b93bf (diff)
downloadliburing-768d4559d0078e70426ef08e0f8dfc0da0ece4d5.tar.gz
liburing-768d4559d0078e70426ef08e0f8dfc0da0ece4d5.tar.bz2
Update POLL API
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test/poll-cancel.c')
-rw-r--r--test/poll-cancel.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/test/poll-cancel.c b/test/poll-cancel.c
index ec12353..8e0f301 100644
--- a/test/poll-cancel.c
+++ b/test/poll-cancel.c
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/poll.h>
#include <sys/wait.h>
@@ -36,14 +37,10 @@ int main(int argc, char *argv[])
printf("child: get sqe failed\n");
return 1;
}
+ memset(sqe, 0, sizeof(*sqe));
sqe->opcode = IORING_OP_POLL;
- sqe->flags = 0;
- sqe->ioprio = 0;
sqe->fd = pipe1[0];
- sqe->addr = POLLIN;
- sqe->off = 0;
- sqe->len = 0;
- sqe->buf_index = 0;
+ sqe->poll_events = POLLIN;
sqe->user_data = addr = (unsigned long) &sqe;
ret = io_uring_submit(&ring);
@@ -57,14 +54,9 @@ int main(int argc, char *argv[])
printf("child: get sqe failed\n");
return 1;
}
+ memset(sqe, 0, sizeof(*sqe));
sqe->opcode = IORING_OP_POLL_CANCEL;
- sqe->flags = 0;
- sqe->ioprio = 0;
- sqe->fd = 0;
sqe->addr = addr;
- sqe->off = 0;
- sqe->len = 0;
- sqe->buf_index = 0;
sqe->user_data = (unsigned long) &sqe;
ret = io_uring_submit(&ring);