James Munns
7af8f35a50
There can be only one (run queue)
2025-09-11 14:45:06 +02:00
James Munns
0e28ba1091
"Deadline Rank Sorted Scheduler" -> "Earliest Deadline First Scheduler"
2025-09-11 14:45:06 +02:00
James Munns
3929142f4c
One more must_use
2025-09-11 14:45:06 +02:00
James Munns
b65a3a301a
Clean up some TODOs
2025-09-11 14:45:06 +02:00
James Munns
ed2e51bfa4
Dependency enablement trickery
2025-09-11 14:45:06 +02:00
James Munns
ba0426f767
Combine DRS and non-DRS atomic scheduler, using cordyceps
2025-09-11 14:45:06 +02:00
James Munns
8c70aafd4b
Make some things more consistent
2025-09-11 14:45:06 +02:00
James Munns
1f50e4d496
Implement Deadline Ranked Scheduling
...
This implements a minimal version of Deadline Rank Scheduling, as well as ways to access and set Deadlines.
This still needs some UX improvements, but is likely Enough for testing.
2025-09-11 14:45:06 +02:00
James Munns
535c80e61f
Add initial DRS scheduler placeholder
...
* Start hacking in cordyceps
This adds a third kind of runqueue, for now it should work the same as the
current "atomics" runqueue, but uses a cordyceps TransferStack instead of
the existing home-rolled linked list.
* Clean up, use new cordyceps feature
* A bit more cleanup
* Update docs to be more clear
2025-09-11 14:45:06 +02:00
Dániel Buga
3fb6a9191c
Prefer pointer-sized atomic operations
2025-08-31 10:22:45 +02:00
Dario Nieuwenhuis
8aec341f28
executor: return error when creating the spawntoken, not when spawning.
2025-08-29 13:23:21 +02:00
Dario Nieuwenhuis
da9cdf0c53
executor: add "task metadata" concept, make name a task metadata.
2025-08-29 13:22:59 +02:00
Dario Nieuwenhuis
2ba34ce217
executor: allow trace and rtos-trace to coexist additively.
...
Before, enabling `trace` would enable embassy-native tracing, and
enabling *both* would *disable* embassy-native tracing.
2025-08-29 13:22:01 +02:00
Dario Nieuwenhuis
658a52fb99
executor: do not store task IDs in RAM, we can get it from the pointer every time.
2025-08-29 13:20:18 +02:00
Dániel Buga
1bf3a44e5d
Retain timer_queue_item
2025-08-18 12:50:52 +02:00
Dániel Buga
74037f0493
Make TimerQueueItem opaque
2025-08-18 12:50:51 +02:00
Ralph Ursprung
98595f659c
embassy-time
: add missing Debug
& defmt::Format
derives
...
`defmt::Format` is *not* implemented for `MockDriver` and
`InnerMockDriver` because the former contains the latter and the latter
is using `Queue` from `embassy-time-queue-utils` which so far does not
have a `defmt` dependency. since this is just a mock driver it shouldn't
be relevant if it has no `defmt::Format` impl.
2025-07-28 15:44:21 +02:00
Johan Anderholm
0f9a7a057f
executor: Make state implementations and their conditions match
...
Use u8 for state_atomics and state_critical_section since that
is all that is needed. Change arm condition to "32" since that is what
is used and required.
2025-05-23 18:27:14 +02:00
Kat Perez
3b873bb6bb
implement TaskRefTrace for tracing-only fields in TaskRef
2025-05-08 13:40:32 -04:00
Kat Perez
462d04c6d5
move TaskTracker to trace
2025-05-08 13:35:34 -04:00
Kat Perez
6085916714
use an intrusive linked list in TaskHeader to track tasks
2025-05-06 11:47:04 -04:00
Kat Perez
f4e0cbb7cc
add ID field to TaskHeader
2025-05-06 09:59:27 -04:00
Kat Perez
61f0f889a0
add get/set for task name
2025-05-06 09:23:39 -04:00
Kat Perez
05d52decb2
add name to TaskHeader
2025-05-06 09:04:21 -04:00
Kat Perez
f8f9c38b2e
add a task registry to tracing infrastructure
2025-05-06 08:27:46 -04:00
Phil-hacker
3a85ecebef
fix rustfmt
2025-04-08 22:30:17 +02:00
Phil-hacker
ce40a39a87
fix compilation on anything not using the feature arch-avr
2025-04-08 22:15:05 +02:00
Phil-hacker
66a02a4f8d
fix the avr executor
2025-04-08 22:10:17 +02:00
Kaspar Schleiser
3f87ce6f50
embassy-executor: introduce Executor::id()
2025-04-04 22:32:55 +02:00
James Munns
c3efb85b85
Fix task_end callback
2025-04-01 14:23:39 +02:00
James Munns
882e2180a4
Add docs, add task_end
trace point
2025-04-01 14:06:04 +02:00
Dániel Buga
76d8a896bb
Make poll_to_despawn a no_op
2024-12-17 18:51:22 +01:00
Dániel Buga
2ca374fc9c
Don't force a wake to despawn
2024-12-17 18:47:56 +01:00
Dániel Buga
a011f48769
Make poll_to_despawn non-generic
2024-12-17 18:37:17 +01:00
Dániel Buga
7d5fbe26c9
Update state diagram
2024-12-17 18:17:36 +01:00
Dániel Buga
8fd08b1e97
Swap poll_fn to allow polling exited tasks
2024-12-17 18:07:06 +01:00
Dániel Buga
edb8f21a74
Take critical section instead of unsafe
2024-12-17 17:53:12 +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
Dániel Buga
fbd0fe06bd
Remove special handling of integrated timer items
2024-12-16 20:37:01 +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
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
dc18ee29a0
Do not access task header
2024-12-10 21:31:42 +01:00
Dániel Buga
5a5495aac4
Refactor integrated-timers
2024-12-10 21:31:42 +01:00