On Fri, Sep 26, 2008 at 7:10 AM, De-MonHell <[EMAIL PROTECTED]> wrote:
> hi all, > > PROBLEM: > > i need to learn hot to use DynamicThreads. > > WHY: > > I need them because i don't know a priori the number of required theads > that i will need at runtime . > What will your threads do? If you are approaching your problem as a spawn a thread when you need to do something, you might want to reconsider. TOS Threads are not intended for that kind of activity. > QUESTIONS: > > 1) the unique documentation that i can found at, it's the TEP134 ( > http://www.tinyos.net/tinyos-2.x/doc/html/tep134.html ), but isn't an > application developer guide at all and the comment in the > TOS_ROOT/tos/lib/tosthread source files! There is something else? > Nope that is the extent of the documentation. > 2)the tep talk about dynamic thread example app in the apps dir, but > there aren't here (neither in the apps/tosthread/apps dir!). I can found > only few example of static thread in these folders. there is something else? > Nope. That is it for now. Dynamic Threads are intended for downloading needed functionality once motes are deployed. > 3) when from a thread i call another sync function > I assume that by a sync function you mean at the synchronous (task) level of TinyOS. You shouldn't call sync functions from threads. Rather you must use a Blocking variant that causes the correct context switch to occur. > , i mustn't care about its internal variables for concurrency, but only > care about external var. right? > What's an external vs. internal variable? > i must to set a mutex for every variable that i access from inside a thread > if this var can be read by more than one thread at any moment? > There is preemption between threads so yes you would have to guard shared variables. > AMBIENT: > > i work with the sources from 2.x CVS tree (so i guess it's the most recent > version!) on a (k)ubuntu hardy (base packets installed from repositories). > The 2.x CVS tree is the tip of the T2.1 tree. Hardy (8.04) is the most current Ubuntu release. So that is fine. eric > thanks! > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Eric B. Decker Senior (over 50 :-) Researcher Autonomous Systems Lab Jack Baskin School of Engineering UCSC
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
