[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/Deluge/extra NetProgM.nc, 1.7, 1.8
John Regehr
regehr at users.sourceforge.net
Tue Jun 3 21:32:44 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/Deluge/extra
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11524/extra
Modified Files:
NetProgM.nc
Log Message:
safe tinyos annotations
Index: NetProgM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/Deluge/extra/NetProgM.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** NetProgM.nc 19 May 2008 21:25:08 -0000 1.7
--- NetProgM.nc 4 Jun 2008 04:32:42 -0000 1.8
***************
*** 54,58 ****
{
BootArgs bootArgs;
! call IFlash.read((uint8_t*)TOSBOOT_ARGS_ADDR, &bootArgs, sizeof(bootArgs));
// Update the local node ID
--- 54,58 ----
{
BootArgs bootArgs;
! call IFlash.read(TCAST(uint8_t* COUNT(sizeof(bootArgs)),TOSBOOT_ARGS_ADDR), &bootArgs, sizeof(bootArgs));
// Update the local node ID
***************
*** 72,80 ****
atomic {
! call IFlash.read((uint8_t*)TOSBOOT_ARGS_ADDR, &bootArgs, sizeof(bootArgs));
if (bootArgs.address != TOS_NODE_ID) {
bootArgs.address = TOS_NODE_ID;
! call IFlash.write((uint8_t*)TOSBOOT_ARGS_ADDR, &bootArgs, sizeof(bootArgs));
}
netprog_reboot();
--- 72,80 ----
atomic {
! call IFlash.read(TCAST(uint8_t* COUNT(sizeof(bootArgs)),TOSBOOT_ARGS_ADDR), &bootArgs, sizeof(bootArgs));
if (bootArgs.address != TOS_NODE_ID) {
bootArgs.address = TOS_NODE_ID;
! call IFlash.write(TCAST(uint8_t* COUNT(sizeof(bootArgs)),TOSBOOT_ARGS_ADDR), &bootArgs, sizeof(bootArgs));
}
netprog_reboot();
***************
*** 100,104 ****
atomic {
! call IFlash.read((uint8_t*)TOSBOOT_ARGS_ADDR, &bootArgs, sizeof(bootArgs));
bootArgs.imageAddr = reprogramImgAddr;
--- 100,104 ----
atomic {
! call IFlash.read(TCAST(uint8_t* COUNT(sizeof(bootArgs)),TOSBOOT_ARGS_ADDR), &bootArgs, sizeof(bootArgs));
bootArgs.imageAddr = reprogramImgAddr;
***************
*** 107,111 ****
bootArgs.address = TOS_NODE_ID;
! call IFlash.write((uint8_t*)TOSBOOT_ARGS_ADDR, &bootArgs, sizeof(bootArgs));
// reboot
--- 107,111 ----
bootArgs.address = TOS_NODE_ID;
! call IFlash.write(TCAST(uint8_t* COUNT(sizeof(bootArgs)),TOSBOOT_ARGS_ADDR), &bootArgs, sizeof(bootArgs));
// reboot
More information about the Tinyos-2-commits
mailing list