[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/drip DisseminatorP.nc, 1.2, 1.3

Phil Levis scipio at users.sourceforge.net
Fri Feb 15 17:31:53 PST 2008


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

Modified Files:
	DisseminatorP.nc 
Log Message:
Signal changed() on change().


Index: DisseminatorP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/drip/DisseminatorP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DisseminatorP.nc	15 Feb 2008 22:51:30 -0000	1.2
--- DisseminatorP.nc	16 Feb 2008 01:31:50 -0000	1.3
***************
*** 81,85 ****
  
    command void DisseminationValue.set( const t* val ) {
!     valueCache = *val;
    }
  
--- 81,87 ----
  
    command void DisseminationValue.set( const t* val ) {
!     if (seqno == DISSEMINATION_SEQNO_UNKNOWN) {
!       valueCache = *val;
!     }
    }
  
***************
*** 106,110 ****
      memcpy( &valueCache, data, size < sizeof(t) ? size : sizeof(t) );
      seqno = newSeqno;
!     post changedTask();
    }
  
--- 108,116 ----
      memcpy( &valueCache, data, size < sizeof(t) ? size : sizeof(t) );
      seqno = newSeqno;
!     // We need to signal here and can't go through a task to
!     // ensure that the update and changed event are atomic.
!     // Otherwise, it is possible that storeData is called,
!     // but before the task runs, the client calls set(). -pal
!     signal DisseminationValue.changed();
    }
  



More information about the Tinyos-2-commits mailing list