修改CFSqueue从Vec变成红黑树 (#229)

使用了由tickbh编写的rbtree: https://github.com/tickbh/rbtree-rs/blob/master/src/lib.rs

Co-authored-by: tickbh <tickdream125@hotmail.com>
This commit is contained in:
hanjiezhou
2023-04-06 00:50:14 +08:00
committed by GitHub
parent 2a7d773d3d
commit e0dfd4d5d7
11 changed files with 1819 additions and 21 deletions

View File

@ -6,6 +6,7 @@ use core::{arch::asm, sync::atomic::compiler_fence};
#[inline]
pub fn current_pcb() -> &'static mut process_control_block {
let ret: Option<&mut process_control_block>;
unsafe {
let mut tmp: u64 = !(32767u64);
compiler_fence(core::sync::atomic::Ordering::SeqCst);

View File

@ -14,6 +14,7 @@ struct process_control_block *get_current_pcb()
: "=r"(current)
: "0"(~32767UL));
barrier();
return current;
};
#define current_pcb get_current_pcb()