k_thread_join polls eTaskGetState/_completed at 10 ms granularity (design predates #18, which kept it). Upstream Zephyr wakes joiners immediately via wait queues.
FreeRTOS-native improvement: join registers its own handle in a _joiner field; the entry wrapper does xTaskNotifyGive(joiner) before terminating. Needs a single-joiner protocol (multi-join is already documented unsupported, see the @note on k_thread_join) and care around the abort path.
Low priority — the cost is ~10 ms join latency, mostly visible as test-suite time.
Rejected-for-now alternative from the same review: splitting per-target code into k_thread_linux.c (the k_timer precedent) — control flow is ~90% shared and a split would duplicate whole functions for ~10 divergent lines. Revisit if the linux deltas grow.
k_thread_joinpollseTaskGetState/_completedat 10 ms granularity (design predates #18, which kept it). Upstream Zephyr wakes joiners immediately via wait queues.FreeRTOS-native improvement: join registers its own handle in a
_joinerfield; the entry wrapper doesxTaskNotifyGive(joiner)before terminating. Needs a single-joiner protocol (multi-join is already documented unsupported, see the@noteonk_thread_join) and care around the abort path.Low priority — the cost is ~10 ms join latency, mostly visible as test-suite time.
Rejected-for-now alternative from the same review: splitting per-target code into
k_thread_linux.c(the k_timer precedent) — control flow is ~90% shared and a split would duplicate whole functions for ~10 divergent lines. Revisit if the linux deltas grow.