Skip to content

Commit

Permalink
try pass nightly CI
Browse files Browse the repository at this point in the history
  • Loading branch information
loongs-zhang committed Feb 1, 2024
1 parent d0f0d49 commit 0655917
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion monoio/src/driver/op/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl<T: IoBufMut> OpAble for Read<T> {
fd,
self.buf.write_ptr() as _,
self.buf.bytes_total(),
seek_offset
seek_offset as _
));

#[cfg(target_os = "macos")]
Expand Down
3 changes: 1 addition & 2 deletions monoio/src/driver/op/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ impl<T: IoBuf> Op<Send<T>> {
impl<T: IoBuf> OpAble for Send<T> {
#[cfg(all(target_os = "linux", feature = "iouring"))]
fn uring_op(&mut self) -> io_uring::squeue::Entry {
#[allow(deprecated)]
#[cfg(feature = "zero-copy")]
fn zero_copy_flag_guard<T: IoBuf>(buf: &T) -> libc::c_int {
// TODO: use libc const after supported.
Expand All @@ -52,11 +53,9 @@ impl<T: IoBuf> OpAble for Send<T> {
// see also: https://www.kernel.org/doc/html/v4.16/networking/msg_zerocopy.html
const MSG_ZEROCOPY_THRESHOLD: usize = 10 * 1024 * 1024;
if buf.bytes_init() >= MSG_ZEROCOPY_THRESHOLD {
#[allow(deprecated)]
libc::MSG_NOSIGNAL as libc::c_int
| MSG_ZEROCOPY
} else {
#[allow(deprecated)]
libc::MSG_NOSIGNAL as libc::c_int
}
}
Expand Down
2 changes: 1 addition & 1 deletion monoio/src/driver/op/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl<T: IoBuf> OpAble for Write<T> {
fd,
self.buf.read_ptr() as _,
self.buf.bytes_init(),
seek_offset
seek_offset as _
));

#[cfg(target_os = "macos")]
Expand Down

0 comments on commit 0655917

Please sign in to comment.