]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
small optimization to join wakeup loop
authorklueska <klueska>
Wed, 22 Oct 2008 07:01:23 +0000 (07:01 +0000)
committerklueska <klueska>
Wed, 22 Oct 2008 07:01:23 +0000 (07:01 +0000)
tos/lib/tosthreads/system/TinyThreadSchedulerP.nc

index c1363864babd8979d1550179bd656a2f0b9cdad9..8466a9821513ef86e4987f450682b956b9b1322d 100644 (file)
@@ -150,6 +150,10 @@ implementation {
     int i,j,k;
     k = 0;
     for(i=0; i<sizeof(t->joinedOnMe); i++) {
+      if(t->joinedOnMe[i] == 0) {
+        k+=8;
+        continue;
+      }
       for(j=0; j<8; j++) {
         if(t->joinedOnMe[i] & 0x1)
           call ThreadScheduler.wakeupThread(k);