Skip to content

Commit a0c13da

Browse files
committed
basic support IOCP Operator
1 parent f11efcf commit a0c13da

File tree

1 file changed

+4
-2
lines changed
  • core/src/syscall/windows

1 file changed

+4
-2
lines changed

core/src/syscall/windows/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,14 +342,15 @@ macro_rules! impl_nio_read_iovec {
342342
std::ffi::c_uint::try_from(arg.len()).unwrap_or_else(|_| {
343343
panic!("{} iovcnt overflow", $crate::common::constants::SyscallName::$syscall)
344344
}),
345+
$recvd,
345346
$($arg, )*
346347
);
347348
if r != -1 {
348349
$crate::syscall::reset_errno();
349350
received += usize::try_from(r).expect("overflow");
350351
if received >= length {
351352
r = 0;
352-
unsafe{ $received.write(received.try_into().expect("overflow")) };
353+
unsafe{ $recvd.write(received.try_into().expect("overflow")) };
353354
break;
354355
}
355356
offset = received.saturating_sub(length);
@@ -367,7 +368,7 @@ macro_rules! impl_nio_read_iovec {
367368
Some(wait_time)
368369
).is_err() {
369370
r = 0;
370-
unsafe{ $received.write(received.try_into().expect("overflow")) };
371+
unsafe{ $recvd.write(received.try_into().expect("overflow")) };
371372
std::mem::forget(vec);
372373
if blocking {
373374
$crate::syscall::set_blocking($fd);
@@ -556,6 +557,7 @@ macro_rules! impl_nio_write_iovec {
556557
std::ffi::c_uint::try_from(arg.len()).unwrap_or_else(|_| {
557558
panic!("{} iovcnt overflow", $crate::common::constants::SyscallName::$syscall)
558559
}),
560+
$sent,
559561
$($arg, )*
560562
);
561563
if r != -1 {

0 commit comments

Comments
 (0)