Remove the Pender enum

This commit is contained in:
Dániel Buga
2023-08-14 08:57:14 +02:00
parent 454a7cbf4c
commit f6007869bf
8 changed files with 98 additions and 101 deletions

View File

@ -10,14 +10,14 @@ mod thread {
#[cfg(feature = "nightly")]
pub use embassy_macros::main_riscv as main;
use crate::raw::OpaqueThreadContext;
use crate::raw::PenderContext;
use crate::thread::ThreadContext;
/// global atomic used to keep track of whether there is work to do since sev() is not available on RISCV
static SIGNAL_WORK_THREAD_MODE: AtomicBool = AtomicBool::new(false);
#[export_name = "__thread_mode_pender"]
fn __thread_mode_pender(_context: OpaqueThreadContext) {
#[export_name = "__pender"]
fn __thread_mode_pender(_context: PenderContext) {
SIGNAL_WORK_THREAD_MODE.store(true, Ordering::SeqCst);
}
@ -27,8 +27,8 @@ mod thread {
pub struct Context;
impl ThreadContext for Context {
fn context(&self) -> OpaqueThreadContext {
OpaqueThreadContext(0)
fn context(&self) -> PenderContext {
0
}
fn wait(&mut self) {