[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/at45db LogStorageP.nc,
1.1.2.14, 1.1.2.15
David Gay
idgay at users.sourceforge.net
Fri Jun 16 15:53:36 PDT 2006
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/storage/Log
README.txt, 1.1.2.2, 1.1.2.3 RandRWC.nc, 1.1.2.6, 1.1.2.7
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/html/tutorial lesson6.html,
NONE, 1.1.2.1 index.html, 1.1.2.5, 1.1.2.6 lesson2.html,
1.1.2.7, 1.1.2.8 lesson3.html, 1.1.2.4, 1.1.2.5 lesson4.html,
1.1.2.1, 1.1.2.2 lesson5.html, 1.1.2.5, 1.1.2.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/at45db
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23052
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
LogStorageP.nc
Log Message:
fix some circular log bugs
Index: LogStorageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/at45db/Attic/LogStorageP.nc,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -C2 -d -r1.1.2.14 -r1.1.2.15
*** LogStorageP.nc 16 Jun 2006 17:32:59 -0000 1.1.2.14
--- LogStorageP.nc 16 Jun 2006 22:53:34 -0000 1.1.2.15
***************
*** 409,412 ****
--- 409,413 ----
metadata.lastRecordOffset = 0;
setWritePage(firstPage);
+ s[client].circled = FALSE;
s[client].wpos = 0;
wmetadataStart();
***************
*** 609,612 ****
--- 610,618 ----
}
+ void appendSyncDone() {
+ s[client].wpos = metadata.pos + PAGE_SIZE;
+ appendStart();
+ }
+
void appendStart() {
storage_len_t vlen = (storage_len_t)npages() * PAGE_SIZE;
***************
*** 660,663 ****
--- 666,673 ----
firstPage = s[client].wpage; // remember page to commit
metadata.pos = s[client].wpos - s[client].woffset;
+ metadata.magic = PERSISTENT_MAGIC;
+ if (s[client].circled)
+ metadata.flags |= F_CIRCLED;
+
call At45db.computeCrc(firstPage, 0, PAGE_SIZE, 0);
***************
*** 677,684 ****
uint8_t i, *md;
- metadata.magic = PERSISTENT_MAGIC;
- if (s[client].circled)
- metadata.flags |= F_CIRCLED;
-
// Include metadata in crc
md = (uint8_t *)&metadata;
--- 687,690 ----
***************
*** 915,919 ****
{
case R_ERASE: eraseMetadataDone(); break;
! case R_APPEND: appendStart(); break;
case R_SYNC: syncMetadataDone(); break;
}
--- 921,925 ----
{
case R_ERASE: eraseMetadataDone(); break;
! case R_APPEND: appendSyncDone(); break;
case R_SYNC: syncMetadataDone(); break;
}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/storage/Log
README.txt, 1.1.2.2, 1.1.2.3 RandRWC.nc, 1.1.2.6, 1.1.2.7
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/html/tutorial lesson6.html,
NONE, 1.1.2.1 index.html, 1.1.2.5, 1.1.2.6 lesson2.html,
1.1.2.7, 1.1.2.8 lesson3.html, 1.1.2.4, 1.1.2.5 lesson4.html,
1.1.2.1, 1.1.2.2 lesson5.html, 1.1.2.5, 1.1.2.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list