Skip to content

Commit

Permalink
move more deinit stuff into preempt::disable()
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Feb 7, 2025
1 parent eb7c31b commit e4ac994
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions esp-wifi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,6 @@ pub unsafe fn deinit_unchecked() -> Result<(), InitializationError> {
// This shuts down the task switcher and timer tick interrupt.
preempt::disable();

crate::preempt::delete_all_tasks();

crate::preempt::timer::TIMER.with(|timer| timer.take());

crate::flags::ESP_WIFI_INITIALIZED.store(false, Ordering::Release);

Ok(())
Expand Down
3 changes: 3 additions & 0 deletions esp-wifi/src/preempt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ pub(crate) fn setup(timer: crate::TimeBase) {
pub(crate) fn disable() {
disable_timer();
disable_multitasking();
delete_all_tasks();

timer::TIMER.with(|timer| timer.take());
}

fn allocate_main_task() -> *mut Context {
Expand Down

0 comments on commit e4ac994

Please sign in to comment.