diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-04-11 09:01:16 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-11 09:01:16 -0600 |
commit | 8115820eb9343d4fa49f4933a2fd7d7006796cc3 (patch) | |
tree | ba163fed4a4bf5854a6942b011e301f74bd50458 /src | |
parent | 093e902c28f5f52c2321c9d6bb86a242e8827859 (diff) |
test/nop: add NOP test case
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src')
-rw-r--r-- | src/liburing.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/liburing.h b/src/liburing.h index cd098ce..a544fa5 100644 --- a/src/liburing.h +++ b/src/liburing.h @@ -145,4 +145,10 @@ static inline void io_uring_prep_fsync(struct io_uring_sqe *sqe, int fd, sqe->fsync_flags = fsync_flags; } +static inline void io_uring_prep_nop(struct io_uring_sqe *sqe) +{ + memset(sqe, 0, sizeof(*sqe)); + sqe->opcode = IORING_OP_NOP; +} + #endif |