Description: use portable-atomic for Debian 32-bit arm support Author: Jonas Smedegaard Last-Update: 2025-02-02 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/helix-dap/Cargo.toml +++ b/helix-dap/Cargo.toml @@ -19,6 +19,7 @@ anyhow = "1.0" log = "0.4" +portable-atomic = "1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "net", "sync"] } --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -16,8 +16,8 @@ net::{IpAddr, Ipv4Addr, SocketAddr}, path::PathBuf, process::Stdio, - sync::atomic::{AtomicU64, Ordering}, }; +use portable_atomic::{AtomicU64, Ordering}; use tokio::{ io::{AsyncBufRead, AsyncWrite, BufReader, BufWriter}, net::TcpStream, --- a/helix-event/Cargo.toml +++ b/helix-event/Cargo.toml @@ -14,6 +14,7 @@ [dependencies] foldhash.workspace = true hashbrown = "0.17" +portable-atomic = "1" tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "sync", "parking_lot", "macros"] } # the event registry is essentially read only but must be an rwlock so we can # setup new events on initialization, hardware-lock-elision hugely benefits this case --- a/helix-event/src/cancel.rs +++ b/helix-event/src/cancel.rs @@ -1,9 +1,8 @@ use std::borrow::Borrow; use std::future::Future; -use std::sync::atomic::AtomicU64; -use std::sync::atomic::Ordering::Relaxed; use std::sync::Arc; +use portable_atomic::{AtomicU64, Ordering::Relaxed}; use tokio::sync::Notify; pub async fn cancelable_future( --- a/helix-lsp/Cargo.toml +++ b/helix-lsp/Cargo.toml @@ -23,6 +23,7 @@ futures-util.workspace = true globset.workspace = true log = "0.4" +portable-atomic = "1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" tokio = { version = "1.50", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "sync"] } --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -24,13 +24,11 @@ use std::{collections::HashMap, path::PathBuf}; use std::{ ffi::OsStr, - sync::{ - atomic::{AtomicU64, Ordering}, - Arc, - }, + sync::Arc, }; use std::{future::Future, sync::OnceLock}; use std::{path::Path, process::Stdio}; +use portable_atomic::{AtomicU64, Ordering}; use tokio::{ io::{BufReader, BufWriter}, process::{Child, Command},