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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ polling = "2.8.0"
educe = "0.6.0"

libc = "0.2"
rand = "0.9"
rand = "0.10"
st3 = "0.4"
crossbeam-deque = "0.8"
time = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion core/src/common/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::{Duration, Instant};
pub fn init() {
let _ = std::thread::spawn(|| {
// exit after 600 seconds, just for CI
let sleep_time = Duration::from_secs(600);
let sleep_time = Duration::from_mins(10);
let start_time = Instant::now();
std::thread::sleep(sleep_time);
let cost = Instant::now().saturating_duration_since(start_time);
Expand Down
4 changes: 1 addition & 3 deletions core/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ pub fn now() -> u64 {
/// current ns time add `dur`.
#[must_use]
pub fn get_timeout_time(dur: Duration) -> u64 {
u64::try_from(dur.as_nanos())
.map(|d| d.saturating_add(now()))
.unwrap_or(u64::MAX)
u64::try_from(dur.as_nanos()).map_or(u64::MAX, |d| d.saturating_add(now()))
}

/// Make the total time into slices.
Expand Down
2 changes: 1 addition & 1 deletion core/src/common/ordered_work_steal.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crossbeam_deque::{Injector, Steal};
use crossbeam_skiplist::SkipMap;
use rand::Rng;
use rand::RngExt;
use st3::fifo::Worker;
use std::collections::VecDeque;
use std::ffi::c_longlong;
Expand Down
2 changes: 1 addition & 1 deletion core/src/common/work_steal.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crossbeam_deque::{Injector, Steal};
use rand::Rng;
use rand::RngExt;
use st3::fifo::Worker;
use std::collections::VecDeque;
use std::fmt::Debug;
Expand Down
2 changes: 1 addition & 1 deletion core/src/coroutine/korosensei.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<'c, Param, Yield, Return> Coroutine<'c, Param, Yield, Return> {
any(target_os = "linux", target_os = "android"),
target_arch = "x86",
))] {
let sp = u64::from(std::ffi::c_uint::from_ne_bytes(context.uc_mcontext.gregs[usize::try_from(libc::REG_ESP).expect("overflow")].to_ne_bytes()));
let sp = u64::from(u32::from_ne_bytes(context.uc_mcontext.gregs[usize::try_from(libc::REG_ESP).expect("overflow")].to_ne_bytes()));
} else if #[cfg(all(target_vendor = "apple", target_arch = "x86_64"))] {
let sp = u64::try_from((*context.uc_mcontext).__ss.__rsp).expect("overflow");
} else if #[cfg(all(
Expand Down
2 changes: 1 addition & 1 deletion core/src/net/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::scheduler::SchedulableCoroutine;
use crate::{error, impl_current_for, impl_display_by_debug, info};
use dashmap::DashSet;
use once_cell::sync::Lazy;
use rand::Rng;
use rand::RngExt;
use std::ffi::{c_char, c_int, c_void, CStr, CString};
use std::io::{Error, ErrorKind};
use std::marker::PhantomData;
Expand Down
Loading