MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / thread_join

Function thread_join

TactilityKernel/source/concurrent/thread.cpp:233–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233error_t thread_join(Thread* thread, TickType_t timeout, TickType_t poll_interval) {
234 check(thread_get_current() != thread);
235
236 TickType_t start_ticks = get_ticks();
237 while (thread_get_task_handle(thread)) {
238 delay_ticks(poll_interval);
239 if (get_ticks() - start_ticks > timeout) {
240 return ERROR_TIMEOUT;
241 }
242 }
243
244 return ERROR_NONE;
245}
246
247TaskHandle_t thread_get_task_handle(Thread* thread) {
248 thread->lock();

Callers 1

ThreadTest.cppFile · 0.85

Calls 5

thread_get_currentFunction · 0.85
get_ticksFunction · 0.85
thread_get_task_handleFunction · 0.85
delay_ticksFunction · 0.85
checkFunction · 0.50

Tested by

no test coverage detected