X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Ftosthreads%2Fsystem%2FDynamicThreadP.nc;h=de03f20dda0c6c04ebb1c1c96405fa3d549cd4be;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hp=b6a1080e77bab1bd5b80fa24eee15d0cfb7d020f;hpb=8f0d681f0336383bb89ca8745aa7ccc52b58803b;p=tinyos-2.x.git diff --git a/tos/lib/tosthreads/system/DynamicThreadP.nc b/tos/lib/tosthreads/system/DynamicThreadP.nc index b6a1080e..de03f20d 100644 --- a/tos/lib/tosthreads/system/DynamicThreadP.nc +++ b/tos/lib/tosthreads/system/DynamicThreadP.nc @@ -137,13 +137,19 @@ happy: command error_t DynamicThread.sleep(uint32_t milli) { return call ThreadSleep.sleep(milli); } + command error_t DynamicThread.join(tosthread_t* t) { + return call ThreadScheduler.joinThread(*t); + } async command thread_t* ThreadInfo.get[uint8_t id]() { atomic return thread_info[id - TOSTHREAD_NUM_STATIC_THREADS]; } + async command error_t ThreadInfo.reset[uint8_t id]() { + return FAIL; + } + async event void ThreadCleanup.cleanup[uint8_t id]() { - call Leds.led2Toggle(); signal ThreadNotification.aboutToDestroy[id](); atomic { uint8_t adjusted_id = id-TOSTHREAD_NUM_STATIC_THREADS;