From: klueska Date: Wed, 22 Oct 2008 07:01:23 +0000 (+0000) Subject: small optimization to join wakeup loop X-Git-Tag: rc_6_tinyos_2_1_1~584 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=f50b3e1320b358f1686b7fd440dc125e3c24c327 small optimization to join wakeup loop --- diff --git a/tos/lib/tosthreads/system/TinyThreadSchedulerP.nc b/tos/lib/tosthreads/system/TinyThreadSchedulerP.nc index c1363864..8466a982 100644 --- a/tos/lib/tosthreads/system/TinyThreadSchedulerP.nc +++ b/tos/lib/tosthreads/system/TinyThreadSchedulerP.nc @@ -150,6 +150,10 @@ implementation { int i,j,k; k = 0; for(i=0; ijoinedOnMe); i++) { + if(t->joinedOnMe[i] == 0) { + k+=8; + continue; + } for(j=0; j<8; j++) { if(t->joinedOnMe[i] & 0x1) call ThreadScheduler.wakeupThread(k);