X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Flib%2Ftosthreads%2Fcsystem%2Ftosthread.h;h=3c1551c904391f560f8cefcb9fa94fca121940d3;hp=b032ad54599529f75a99d85c13117e5ca098cdce;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/tos/lib/tosthreads/csystem/tosthread.h b/tos/lib/tosthreads/csystem/tosthread.h index b032ad54..3c1551c9 100644 --- a/tos/lib/tosthreads/csystem/tosthread.h +++ b/tos/lib/tosthreads/csystem/tosthread.h @@ -120,4 +120,17 @@ extern error_t tosthread_resume(tosthread_t* t); */ extern error_t tosthread_sleep(uint32_t milli); +/** + * tosthread_join(tosthread_t* t) + * + * This function bocks until the thread passed as a parameter has completed + * + * @param id The handle to the thread to block on + * @return An error code indicating whether the thread could be waited on or not + * SUCCESS - The thread has been waited on and is now completed + * EALREADY - The thread we are trying to wait on has already completed + * FAIL - The thread could not waited on + */ +extern error_t tosthread_join(tosthread_t* id); + #endif //TOSTHREAD_H_INCLUDED