175 Commits

Author SHA1 Message Date
Dániel Buga
889b419fc4
Simplify ARM run_enqueue 2024-12-17 17:15:40 +01:00
Dániel Buga
c6ca46c825
Set RUN_QUEUED unconditionally 2024-12-17 16:52:13 +01:00
Dániel Buga
7eac184af0
Document task states and state transitions 2024-12-17 16:47:33 +01:00
Dario Nieuwenhuis
c504ae8d3a
Merge pull request #3656 from bugadani/timer-queue-special
Remove special handling of integrated timer queues and items
2024-12-17 14:52:12 +01:00
Dario Nieuwenhuis
fc25fca00b Remove WakerHack for good.
Now that 1.83 xtensa is out, we can remove it unconditionally.
2024-12-17 13:06:31 +01:00
Dániel Buga
c3c571e01e
Remove test implementation of schedule_wake 2024-12-16 20:37:02 +01:00
Dániel Buga
c90d048ecb
Remove TIMER_QUEUED 2024-12-16 20:37:02 +01:00
Dániel Buga
71812d0c9b
Changelog 2024-12-16 20:37:01 +01:00
Dániel Buga
fbd0fe06bd
Remove special handling of integrated timer items 2024-12-16 20:37:01 +01:00
Dániel Buga
c9f32b7e36
Attach payload to TimerQueueItem 2024-12-16 20:36:59 +01:00
Dániel Buga
3c121e5425
Remove special handling of integrated timer queue 2024-12-16 19:22:22 +01:00
Dániel Buga
b47a631abf
Rely on atomic load-store on all targets 2024-12-16 17:29:07 +01:00
Dániel Buga
b44ef5ccb4
Fix racy access of TaskHeader::executor 2024-12-16 16:01:08 +01:00
Dániel Buga
f389ba3721
Only lock once to wake a task 2024-12-16 15:28:19 +01:00
Dániel Buga
a10290b28e
Zero-inizialize expires_at 2024-12-16 09:15:15 +01:00
Dániel Buga
e861344b17
Fix comments and tweak task exit 2024-12-15 18:50:00 +01:00
Dániel Buga
5c4983236c
Make sure an exited task does not get stuck in a timer queue 2024-12-15 18:50:00 +01:00
Dario Nieuwenhuis
2f2e2c6031
Make integrated-timers the default, remove Cargo feature. 2024-12-15 18:49:57 +01:00
Dániel Buga
ec96395d08
Prevent task from respawning while in the timer queue 2024-12-13 21:20:57 +01:00
Dániel Buga
d45ea43892
Move integrated timer queue into time-queue-driver 2024-12-12 15:38:52 +01:00
Dániel Buga
dc18ee29a0
Do not access task header 2024-12-10 21:31:42 +01:00
Dániel Buga
12f58fbcfd
Remove TIMER_QUEUED state 2024-12-10 21:31:42 +01:00
Dániel Buga
6cc8709ecc
Changelog 2024-12-10 21:31:42 +01:00
Dániel Buga
5a5495aac4
Refactor integrated-timers 2024-12-10 21:31:42 +01:00
Ulf Lilleengen
f0be2fdce4 Extend tracing api to support executor id and end task
Allow applications to provide a trace implementation that only needs to
implement APIs used by the embassy executor, and provide more context in
the event of multiple executors being used.
2024-12-09 15:16:03 +01:00
Dániel Buga
8ebe059ecb
Add initialize 2024-11-19 16:25:17 +01:00
Dániel Buga
ff02ee1a22
Only set callback once 2024-11-19 14:42:41 +01:00
Dario Nieuwenhuis
796f6c034a Release embassy-executor 0.6.3. 2024-11-12 18:07:50 +01:00
Dario Nieuwenhuis
853c5c567a executor: compare vtable addr instead of contents.
Saves a whopping 44 bytes of text, yay.
2024-11-12 16:30:46 +01:00
Dario Nieuwenhuis
baeb59b5b8
executor: use WakerHack unconditionally even if nightly feature is enabled. (#3528)
This ensures the executor compiles with all recent nightly versions,
including the stable-but-with-nightly-features-enabled xtensa rustc.
2024-11-12 16:28:26 +01:00
Dániel Buga
aeb85454e9
Also bump macros 2024-11-06 14:09:41 +01:00
Dániel Buga
94659325ab
Prep executor 0.6.2 2024-11-06 13:58:02 +01:00
Dániel Buga
1e850ae791
Detect and allow older nightlies 2024-11-06 10:48:59 +01:00
Dario Nieuwenhuis
e782eabff7 Changelog executor v0.5.1 release. 2024-10-21 16:20:40 +02:00
Dario Nieuwenhuis
1a24b4f018 Release embassy-executor v0.6.1, embassy-executor-macros v0.6.1 2024-10-21 01:26:02 +02:00
Dario Nieuwenhuis
8f98268723 executor: add compile-fail / ui tests. 2024-10-20 23:54:17 +02:00
Dummyc0m
9e6e09a8d7 executor/spin: introduce an architecture agnostic executor
Spin polls the raw executor and never sleeps. It is useful for disabling
any power features associated with wfi/wfe-like instructions.

When implementing support for the CH32V30x MCU, the wfi instruction
had issues interacting with the USB OTG peripheral and appeared to be
non-spec-compliant.

1. When sending a USB Data-in packet, the USB peripheral appears to be
unable to read the system main memory while in WFI. This manifests in
the USB peripheral sending all or partially zeroed DATA packets.
Disabling WFI works around this issue.

2. The WFI instruction does not wake up the processor when MIE is
disabled. The MCU provides a WFITOWFE bit to emulate the WFE instruction
on arm, which, when enabled, ignores the MIE and allows the processor to
wake up. This works around the non-compliant WFI implementation.

Co-authored-by: Codetector <codetector@codetector.org>
Co-authored-by: Dummyc0m <y@types.moe>
2024-10-06 23:33:34 -07:00
Oleksandr Babak
1443f3386b
fix: remove stable nightly feature 2024-09-06 11:34:30 +02:00
Oleksandr Babak
01d8508b6c
fix: nightly api changed during the night 2024-09-06 11:16:44 +02:00
Samuel Maier
db00f3f5ec Enable critical-section/std on wasm
Without that feature one will find import errors on opening the webpage, that are hard to debug.
The feature was indirectly enabled in the wasm example, however the reason wasn't documented and thus it was easy to miss.
2024-09-05 11:45:49 +02:00
Ulf Lilleengen
886580179f update dates 2024-08-05 08:58:56 +02:00
Ulf Lilleengen
37d7b0cd06 prepare release embassy-executor 2024-08-05 08:56:29 +02:00
Dario Nieuwenhuis
2d678d6956 Update to Rust 1.80, make check-cfg unconditional. 2024-07-25 15:53:00 +02:00
Tarun Singh
a716a3f006 Reduced define for 'unreachable!' to a single macro rule 2024-07-17 17:05:52 -04:00
Dario Nieuwenhuis
6a4ac5bd60 Add collapse_debuginfo to fmt.rs macros.
This makes location info in defmt logs point to the code calling the macro,
instead of always to fmt.rs as before. Fix works with nightlies
starting with today's, and stable 1.81+.
2024-06-17 01:38:57 +02:00
Dario Nieuwenhuis
4d9115b3fb Update stable to Rust 1.79. 2024-06-13 20:40:04 +02:00
zjp
dd6a873447 minimize cfg code in task_from_waker 2024-06-13 07:59:28 +08:00
zjp
b780df5f76 put cfg code inside task_from_waker function 2024-06-13 07:33:40 +08:00
zjp
6b9470be2c fix warning on unused import 2024-06-09 11:50:32 +08:00
zjp
3f45ec6ead use nightly waker_getters APIs
Since https://github.com/rust-lang/rust/issues/96992 has stalled,
to prevent potential unsoundness caused by transmuting to &WakerHack,
we can use nightly waker_getters APIs by gating it behind nightly
feature in embassy-executor without waiting for it to be stablized.
2024-06-09 11:39:47 +08:00