]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/tosthreads/system/TinyThreadSchedulerP.nc
small optimization to join wakeup loop
[tinyos-2.x.git] / 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);