Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ open-coroutine-macros = { path = "macros", version = "0.7.0" }
tracing = { version = "0.1", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false }
tracing-appender = { version = "0.2", default-features = false }
cargo_metadata = { version = "0.19", default-features = false }
cargo_metadata = { version = "0.20", default-features = false }
mio = { version = "1.0", default-features = false }

cfg-if = "1.0.0"
Expand All @@ -45,7 +45,7 @@ crossbeam-utils = "0.8"
crossbeam-skiplist = "0.1"
nix = "0.30"
io-uring = "0.7"
windows-sys = "0.59"
windows-sys = "0.60"
anyhow = "1.0"
slab = "0.4"
backtrace = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion core/docs/en/work-steal.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ better to let them help other threads work.
## What is work steal queue?

A work steal queue consists of a global queue and multiple local queues, the global queue is unbounded, while the local
queue has a bounded RingBuffer. To ensure high performance, the number of local queues is usually equal to the number of
queue has a bounded `RingBuffer`. To ensure high performance, the number of local queues is usually equal to the number of
threads. I's worth mentioning that if all threads prioritize local tasks, there will be an extreme situation where tasks
on the shared queue will never have a chance to be scheduled. To avoid this imbalance, refer to goroutine, every time a
thread has scheduled 60 tasks from the local queue, it will be forced to pop a task from the shared queue.
Expand Down
4 changes: 2 additions & 2 deletions core/src/net/operator/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl Operator<'_> {
&self,
timeout: Option<Duration>,
want: usize,
) -> std::io::Result<(usize, CompletionQueue, Option<Duration>)> {
) -> std::io::Result<(usize, CompletionQueue<'_>, Option<Duration>)> {
if support_io_uring() {
if self
.entering
Expand All @@ -113,7 +113,7 @@ impl Operator<'_> {
&self,
timeout: Option<Duration>,
want: usize,
) -> std::io::Result<(usize, CompletionQueue, Option<Duration>)> {
) -> std::io::Result<(usize, CompletionQueue<'_>, Option<Duration>)> {
let start_time = Instant::now();
self.timeout_add(crate::common::constants::IO_URING_TIMEOUT_USERDATA, timeout)?;
let mut cq = unsafe { self.inner.completion_shared() };
Expand Down
6 changes: 3 additions & 3 deletions core/src/net/operator/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl<'o> Operator<'o> {
self.iocp,
uninit.as_mut_ptr().cast(),
uninit.len().try_into().expect("overflow"),
&mut recv_count,
&raw mut recv_count,
left_ns
.saturating_div(1_000_000)
.try_into()
Expand Down Expand Up @@ -242,7 +242,7 @@ impl<'o> Operator<'o> {
SOL_SOCKET,
SO_PROTOCOL_INFO,
std::ptr::from_mut(&mut sock_info).cast(),
&mut sock_info_len,
&raw mut sock_info_len,
) != 0
{
return Err(Error::other("get socket info failed"));
Expand All @@ -252,7 +252,7 @@ impl<'o> Operator<'o> {
sock_info.iAddressFamily,
sock_info.iSocketType,
sock_info.iProtocol,
&sock_info,
&raw const sock_info,
0,
WSA_FLAG_OVERLAPPED,
);
Expand Down
3 changes: 2 additions & 1 deletion core/src/syscall/windows/SetFilePointerEx.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::ffi::c_longlong;
use windows_sys::Win32::Foundation::{BOOL, HANDLE};
use windows_sys::core::BOOL;
use windows_sys::Win32::Foundation::HANDLE;
use windows_sys::Win32::Storage::FileSystem::SET_FILE_POINTER_MOVE_METHOD;

trait SetFilePointerExSyscall {
Expand Down
3 changes: 2 additions & 1 deletion core/src/syscall/windows/WaitOnAddress.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::ffi::{c_uint, c_void};
use std::time::Duration;
use windows_sys::Win32::Foundation::{BOOL, ERROR_TIMEOUT, FALSE, TRUE};
use windows_sys::core::BOOL;
use windows_sys::Win32::Foundation::{ERROR_TIMEOUT, FALSE, TRUE};
use crate::common::{get_timeout_time, now};
use crate::net::EventLoops;
use crate::syscall::reset_errno;
Expand Down
2 changes: 1 addition & 1 deletion core/src/syscall/windows/accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl<I: AcceptSyscall> AcceptSyscall for IocpAcceptSyscall<I> {
SOL_SOCKET,
SO_PROTOCOL_INFO,
std::ptr::from_mut(&mut sock_info).cast(),
&mut sock_info_len,
&raw mut sock_info_len,
) != 0
{
return INVALID_SOCKET;
Expand Down
4 changes: 2 additions & 2 deletions hook/src/syscall/windows.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::ffi::{c_int, c_longlong, c_uint, c_void};
use std::io::Error;
use windows_sys::core::{PCSTR, PCWSTR, PSTR};
use windows_sys::Win32::Foundation::{BOOL, HANDLE, TRUE};
use windows_sys::core::{BOOL, PCSTR, PCWSTR, PSTR};
use windows_sys::Win32::Foundation::{HANDLE, TRUE};
use windows_sys::Win32::Networking::WinSock::{
FD_SET, IPPROTO, LPCONDITIONPROC, LPWSAOVERLAPPED_COMPLETION_ROUTINE, SEND_RECV_FLAGS,
SOCKADDR, SOCKET, TIMEVAL, WINSOCK_SHUTDOWN_HOW, WINSOCK_SOCKET_TYPE, WSABUF, WSAPOLLFD,
Expand Down
2 changes: 1 addition & 1 deletion open-coroutine/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn main() {
metadata
.packages
.iter()
.find(|pkg| pkg.name.eq("open-coroutine"))
.find(|pkg| pkg.name.as_str().eq("open-coroutine"))
.expect("read current package failed")
} else {
metadata
Expand Down
Loading