projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10b582d
)
bug fix: acquire lock before copying the object into cache
author
adash
<adash>
Tue, 12 May 2009 00:41:54 +0000
(
00:41
+0000)
committer
adash
<adash>
Tue, 12 May 2009 00:41:54 +0000
(
00:41
+0000)
Robust/src/Runtime/STM/stm.c
patch
|
blob
|
history
diff --git
a/Robust/src/Runtime/STM/stm.c
b/Robust/src/Runtime/STM/stm.c
index ddd4cfe631d1d67082b59dab7675905870f1023e..234f2391162aaff91afbcc1aca10a8dddc7b7c92 100644
(file)
--- a/
Robust/src/Runtime/STM/stm.c
+++ b/
Robust/src/Runtime/STM/stm.c
@@
-247,7
+247,6
@@
__attribute__((pure)) void *transRead(void * oid, void *gl) {
GETSIZE(size, header);
size += sizeof(objheader_t);
objcopy = (objheader_t *) objstrAlloc(size);
- memcpy(objcopy, header, size);
#ifdef STMSTATS
header->accessCount++;
//FIXME riskratio fix
@@
-259,6
+258,7
@@
__attribute__((pure)) void *transRead(void * oid, void *gl) {
needLock(header,gl);
}
#endif
+ memcpy(objcopy, header, size);
/* Insert into cache's lookup table */
STATUS(objcopy)=0;
t_chashInsert(oid, &objcopy[1]);