You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: avr.rs
    path of file: ./repos/embassy/embassy-executor/src/arch
    
    the code of the file until where you have to start completion: #[cfg(feature = "executor-interrupt")]
compile_error!("`executor-interrupt` is not supported with `arch-avr`.");

#[cfg(feature = "executor-thread")]
pub use thread::*;
#[cfg(feature = "executor-thread")]
mod thread {
    use core::marker::PhantomData;

    pub use embassy_executor_macros::main_avr as main;
    use portable_atomic::{AtomicBool, Ordering};

    use crate::{raw, Spawner};

    static SIGNAL_WORK_THREAD_MODE: AtomicBool = AtomicBool::new(false);

    #[export_name = "__pender"]
    fn __pender(_context: *mut 
    
        pub fn run(&'static mut self, init: impl FnOnce(Spawner)) -> ! {
            init(self.inner.spawner());

            loop {
                unsafe {
                    avr_device::interrupt::disable();
                    if !SIGNAL_WORK_THREAD_MODE.swap(false, Ordering::SeqCst) {
                        avr_device::interrupt::enable();
                        avr_device::asm::sleep();
                    } else {
                        avr_device::interrupt::enable();
                        self.inner.poll();
                    }
                }
            }
        }