diff options
| author | Jens Axboe <axboe@kernel.dk> | 2019-05-19 11:36:12 -0600 | 
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2019-05-19 11:36:12 -0600 | 
| commit | c37dadb15fdd82d931364335906f1b42244ec332 (patch) | |
| tree | 602308d43d0b344495b6293cfb9a944588faf009 /src | |
| parent | 4e416217170ef2a5dbbd6766a4f3f1381ef2e7c9 (diff) | |
| parent | 38eabdd644116198de452d7407b0b35ce51cdb1b (diff) | |
Merge branch 'const-matching' of https://github.com/flamingcow66/liburing
* 'const-matching' of https://github.com/flamingcow66/liburing:
  Match const signatures in io_uring_prep_* to native functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/liburing.h | 13 | 
1 files changed, 7 insertions, 6 deletions
diff --git a/src/liburing.h b/src/liburing.h index 3df5462..2651b3d 100644 --- a/src/liburing.h +++ b/src/liburing.h @@ -106,7 +106,8 @@ static inline void *io_uring_cqe_get_data(struct io_uring_cqe *cqe)  }  static inline void io_uring_prep_rw(int op, struct io_uring_sqe *sqe, int fd, -				    void *addr, unsigned len, off_t offset) +				    const void *addr, unsigned len, +				    off_t offset)  {  	memset(sqe, 0, sizeof(*sqe));  	sqe->opcode = op; @@ -117,8 +118,8 @@ static inline void io_uring_prep_rw(int op, struct io_uring_sqe *sqe, int fd,  }  static inline void io_uring_prep_readv(struct io_uring_sqe *sqe, int fd, -				       struct iovec *iovecs, unsigned nr_vecs, -				       off_t offset) +				       const struct iovec *iovecs, +				       unsigned nr_vecs, off_t offset)  {  	io_uring_prep_rw(IORING_OP_READV, sqe, fd, iovecs, nr_vecs, offset);  } @@ -131,14 +132,14 @@ static inline void io_uring_prep_read_fixed(struct io_uring_sqe *sqe, int fd,  }  static inline void io_uring_prep_writev(struct io_uring_sqe *sqe, int fd, -				        struct iovec *iovecs, unsigned nr_vecs, -					off_t offset) +					const struct iovec *iovecs, +					unsigned nr_vecs, off_t offset)  {  	io_uring_prep_rw(IORING_OP_WRITEV, sqe, fd, iovecs, nr_vecs, offset);  }  static inline void io_uring_prep_write_fixed(struct io_uring_sqe *sqe, int fd, -					     void *buf, unsigned nbytes, +					     const void *buf, unsigned nbytes,  					     off_t offset)  {  	io_uring_prep_rw(IORING_OP_WRITE_FIXED, sqe, fd, buf, nbytes, offset);  | 
