From f50b3e1320b358f1686b7fd440dc125e3c24c327 Mon Sep 17 00:00:00 2001 From: klueska Date: Wed, 22 Oct 2008 07:01:23 +0000 Subject: [PATCH] small optimization to join wakeup loop --- tos/lib/tosthreads/system/TinyThreadSchedulerP.nc | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.39.2