Commit 5e21717
fix(i2c_master): yield from ISR when no matching device is found
`i2c_master_isr_handler_default()` may set HPTaskAwoken to pdTRUE via
`xQueueSendFromISR()` (event_queue), `xSemaphoreTakeFromISR()` and
`xSemaphoreGiveFromISR()` on `bus_lock_mux`. When the device list lookup
returns no matching device, the function returned directly, skipping
the `portYIELD_FROM_ISR()` at the bottom of the handler. A higher-
priority task waiting on the bus mux or the event queue would then have
to wait for the next scheduler tick instead of being preempted into
immediately, inflating worst-case event latency.
Replace the early return with a goto to the existing yield check at the
end of the ISR.
Merges #185691 parent cb4a55a commit 5e21717
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
831 | | - | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
832 | 835 | | |
833 | 836 | | |
834 | 837 | | |
| |||
866 | 869 | | |
867 | 870 | | |
868 | 871 | | |
| 872 | + | |
869 | 873 | | |
870 | 874 | | |
871 | 875 | | |
| |||
0 commit comments