mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-16 17:46:48 +00:00
Use a SpinLock
for the thread table instead of Mutex
This commit is contained in:
parent
aeba7bec52
commit
ed82c11dd3
@ -4,7 +4,7 @@ use super::{Thread, Tid};
|
||||
use crate::prelude::*;
|
||||
|
||||
lazy_static! {
|
||||
static ref THREAD_TABLE: Mutex<BTreeMap<Tid, Arc<Thread>>> = Mutex::new(BTreeMap::new());
|
||||
static ref THREAD_TABLE: SpinLock<BTreeMap<Tid, Arc<Thread>>> = SpinLock::new(BTreeMap::new());
|
||||
}
|
||||
|
||||
pub fn add_thread(thread: Arc<Thread>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user