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
6 changes: 3 additions & 3 deletions crates/host_env/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ pub use libc::{
RLIMIT_NOFILE, RLIMIT_NPROC, RLIMIT_RSS, RLIMIT_STACK, c_long, rlim_t, rlimit, timeval,
};

#[cfg(target_os = "android")]
pub use libc::RLIM_NLIMITS;

#[cfg(any(target_os = "linux", target_os = "android", target_os = "emscripten"))]
pub use libc::{RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_RTPRIO, RLIMIT_SIGPENDING};

Expand All @@ -36,6 +33,9 @@ pub use libc::RUSAGE_THREAD;
#[cfg(not(any(target_os = "windows", target_os = "redox")))]
pub use libc::{RUSAGE_CHILDREN, RUSAGE_SELF};

#[cfg(target_os = "android")]
pub const RLIM_NLIMITS: libc::c_int = 16;

#[derive(Debug, Clone, Copy)]
pub struct RUsage {
pub ru_utime: libc::timeval,
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static FUNC_VERSION_COUNTER: AtomicU32 = AtomicU32::new(1);
/// Once the counter wraps to 0, it stays at 0 permanently.
fn next_func_version() -> u32 {
FUNC_VERSION_COUNTER
.fetch_update(Relaxed, Relaxed, |v| (v != 0).then(|| v.wrapping_add(1)))
.try_update(Relaxed, Relaxed, |v| (v != 0).then(|| v.wrapping_add(1)))
.unwrap_or(0)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ impl PyType {
let flags_bits = flags.bits();
let _ = self
.abc_tpflags
.fetch_update(Ordering::AcqRel, Ordering::Acquire, |old| {
.try_update(Ordering::AcqRel, Ordering::Acquire, |old| {
Some((old & !collection_bits) | flags_bits)
});
self.modified();
Expand Down
Loading