Skip to content
Open
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
71 changes: 35 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "executor"
version = "0.1.0"
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
Expand All @@ -14,20 +14,19 @@ lazy_static = { version = "1.4", features = ["spin_no_std"] }
unicycle = { git = "https://github.com/pleasewhy/unicycle", rev = "904f1c061d4784a5642e092d308cf523a9270c6e", default-features = false }
bit-iter = "1.0.0"
spin = "0.9"
woke = "0.0.2"
woke = "0.0.4"
log = "0.4"
cfg-if = "1.0"

# Bare-metal mode on x86_64
[target.'cfg(target_arch = "x86_64")'.dependencies]
raw-cpuid = "10.2.0"
raw-cpuid = "11.0.1"
x86_64 = "0.14.8"

# Bare-metal mode on riscv64
[target.'cfg(target_arch = "riscv64")'.dependencies]
riscv = "0.8"
riscv = "0.10.1"

# Bare-metal mode on aarch64
[target.'cfg(target_arch = "aarch64")'.dependencies]
tock-registers = "0.7"
cortex-a = "7.2.0"
aarch64-cpu = "9.4.0"
7 changes: 4 additions & 3 deletions src/arch/aarch64/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use aarch64_cpu::registers::*;
use core::arch::global_asm;
use cortex_a::registers::*;
use tock_registers::interfaces::Readable;
use aarch64_cpu::asm;
use aarch64_cpu::registers::Readable;

mod context;

Expand Down Expand Up @@ -31,7 +32,7 @@ pub(crate) fn wait_for_interrupt() {
if !enable {
intr_on();
}
cortex_a::asm::wfi();
asm::wfi();
if !enable {
intr_off();
}
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![feature(get_mut_unchecked)]
#![feature(generators, generator_trait)]
#![feature(stmt_expr_attributes)]
#![feature(atomic_mut_ptr)]
#![feature(box_into_inner)]
#![feature(new_uninit)]
// some interfaces is still under developing
Expand Down
2 changes: 1 addition & 1 deletion src/task_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl TaskCollection {
});
// SAFETY: no other Arc or Weak pointers
let tc_clone = task_collection.clone();
let mut tc = unsafe { Arc::get_mut_unchecked(&mut task_collection) };
let tc = unsafe { Arc::get_mut_unchecked(&mut task_collection) };
for priority in 0..MAX_PRIORITY {
tc.future_collections
.push(Mutex::new(FutureCollection::new(priority)));
Expand Down
2 changes: 1 addition & 1 deletion src/waker_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl AtomicU64SC {
#[inline(always)]
#[allow(unused)]
pub fn as_mut_ptr(&mut self) -> *mut u64 {
self.0.as_mut_ptr()
self.0.as_ptr()
}
}

Expand Down