diff options
| author | James Munns <[email protected]> | 2025-04-01 14:35:21 +0200 |
|---|---|---|
| committer | James Munns <[email protected]> | 2025-04-01 14:35:21 +0200 |
| commit | ef3c1b87d16d17e312e869546fae00f895f68989 (patch) | |
| tree | cf11e76149489b9fedf20edd1eeb578f677e8df9 | |
| parent | 2e474b7df2466364964156e119b37bd8445169d7 (diff) | |
Minor docs improvements
| -rw-r--r-- | embassy-executor/src/raw/trace.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/embassy-executor/src/raw/trace.rs b/embassy-executor/src/raw/trace.rs index 8fcf84658..aba519c8f 100644 --- a/embassy-executor/src/raw/trace.rs +++ b/embassy-executor/src/raw/trace.rs | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | //! ╚═════════╝ └─────────┘ └─────────┘ │ | 33 | //! ╚═════════╝ └─────────┘ └─────────┘ │ |
| 34 | //! │ ▲ ▲ │ │ │ | 34 | //! │ ▲ ▲ │ │ │ |
| 35 | //! │ (4) │ │(6) │ | 35 | //! │ (4) │ │(6) │ |
| 36 | //! │ │ └ ─ ─ ┘ │ │ | 36 | //! │ │(7) └ ─ ─ ┘ │ │ |
| 37 | //! │ │ │ │ | 37 | //! │ │ │ │ |
| 38 | //! │ ┌──────┐ (5) │ │ ┌─────┐ | 38 | //! │ ┌──────┐ (5) │ │ ┌─────┐ |
| 39 | //! │ IDLE │◀────────────────┘ └─▶│ END │ │ | 39 | //! │ IDLE │◀────────────────┘ └─▶│ END │ │ |
| @@ -43,7 +43,7 @@ | |||
| 43 | //! └──────────────────────┘ | 43 | //! └──────────────────────┘ |
| 44 | //! ``` | 44 | //! ``` |
| 45 | //! | 45 | //! |
| 46 | //! 1. A task is spawned. `_embassy_trace_task_new` is called | 46 | //! 1. A task is spawned, `_embassy_trace_task_new` is called |
| 47 | //! 2. A task is enqueued for the first time, `_embassy_trace_task_ready_begin` is called | 47 | //! 2. A task is enqueued for the first time, `_embassy_trace_task_ready_begin` is called |
| 48 | //! 3. A task is polled, `_embassy_trace_task_exec_begin` is called | 48 | //! 3. A task is polled, `_embassy_trace_task_exec_begin` is called |
| 49 | //! 4. WHILE a task is polled, the task is re-awoken, and `_embassy_trace_task_ready_begin` is | 49 | //! 4. WHILE a task is polled, the task is re-awoken, and `_embassy_trace_task_ready_begin` is |
| @@ -51,7 +51,8 @@ | |||
| 51 | //! RUNNING state is existed. `_embassy_trace_task_exec_end` is called when polling is | 51 | //! RUNNING state is existed. `_embassy_trace_task_exec_end` is called when polling is |
| 52 | //! complete, marking the transition to WAITING | 52 | //! complete, marking the transition to WAITING |
| 53 | //! 5. Polling is complete, `_embassy_trace_task_exec_end` is called | 53 | //! 5. Polling is complete, `_embassy_trace_task_exec_end` is called |
| 54 | //! 6. The task has completed, and `_embassy_trace_task_end` is called. | 54 | //! 6. The task has completed, and `_embassy_trace_task_end` is called |
| 55 | //! 7. A task is awoken, `_embassy_trace_task_ready_begin` is called | ||
| 55 | //! | 56 | //! |
| 56 | //! ## Executor Tracing lifecycle | 57 | //! ## Executor Tracing lifecycle |
| 57 | //! | 58 | //! |
| @@ -73,10 +74,10 @@ | |||
| 73 | //! 1. The executor is started (no associated trace) | 74 | //! 1. The executor is started (no associated trace) |
| 74 | //! 2. A task on this executor is awoken. `_embassy_trace_task_ready_begin` is called | 75 | //! 2. A task on this executor is awoken. `_embassy_trace_task_ready_begin` is called |
| 75 | //! when this occurs, and `_embassy_trace_poll_start` is called when the executor | 76 | //! when this occurs, and `_embassy_trace_poll_start` is called when the executor |
| 76 | //! actually begins running. | 77 | //! actually begins running |
| 77 | //! 3. The executor has decided a task to poll. `_embassy_trace_task_exec_begin` is called. | 78 | //! 3. The executor has decided a task to poll. `_embassy_trace_task_exec_begin` is called |
| 78 | //! 4. The executor finishes polling the task. `_embassy_trace_task_exec_end` is called. | 79 | //! 4. The executor finishes polling the task. `_embassy_trace_task_exec_end` is called |
| 79 | //! 5. The executor has finished polling tasks. `_embassy_trace_executor_idle` is called. | 80 | //! 5. The executor has finished polling tasks. `_embassy_trace_executor_idle` is called |
| 80 | 81 | ||
| 81 | #![allow(unused)] | 82 | #![allow(unused)] |
| 82 | 83 | ||
| @@ -129,6 +130,9 @@ extern "Rust" { | |||
| 129 | /// | 130 | /// |
| 130 | /// If the given task is currently IDLE, this marks the TASK state transition | 131 | /// If the given task is currently IDLE, this marks the TASK state transition |
| 131 | /// from IDLE -> WAITING. | 132 | /// from IDLE -> WAITING. |
| 133 | /// | ||
| 134 | /// NOTE: This may be called from an interrupt, outside the context of the current | ||
| 135 | /// task or executor. | ||
| 132 | fn _embassy_trace_task_ready_begin(executor_id: u32, task_id: u32); | 136 | fn _embassy_trace_task_ready_begin(executor_id: u32, task_id: u32); |
| 133 | 137 | ||
| 134 | /// This callback is called AFTER all dequeued tasks in a single call to poll | 138 | /// This callback is called AFTER all dequeued tasks in a single call to poll |
