[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection ForwardingEngineP.nc, 1.1.2.34, 1.1.2.35

Rodrigo Fonseca rfonseca76 at users.sourceforge.net
Thu Jun 22 11:27:09 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19986

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	ForwardingEngineP.nc 
Log Message:
Made check for duplicate in queue atomic


Index: ForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection/Attic/ForwardingEngineP.nc,v
retrieving revision 1.1.2.34
retrieving revision 1.1.2.35
diff -C2 -d -r1.1.2.34 -r1.1.2.35
*** ForwardingEngineP.nc	22 Jun 2006 17:05:24 -0000	1.1.2.34
--- ForwardingEngineP.nc	22 Jun 2006 18:27:04 -0000	1.1.2.35
***************
*** 468,477 ****
      }
      //... and in the queue for duplicates
!     for (i = call SendQueue.size(); --i ;) {
!         qe = call SendQueue.element(i);
!         if (call CollectionPacket.getPacketID(qe->msg) == msg_uid) {
!             duplicate = TRUE;
!             break;
!         }
      }
      if (duplicate) {
--- 468,479 ----
      }
      //... and in the queue for duplicates
!     atomic {
!     	for (i = call SendQueue.size(); --i ;) {
!         	qe = call SendQueue.element(i);
! 	        if (call CollectionPacket.getPacketID(qe->msg) == msg_uid) {
!         	    duplicate = TRUE;
! 	            break;
!         	}
! 	    }
      }
      if (duplicate) {



More information about the Tinyos-2-commits mailing list