projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de9ca83
)
just an explanation of LOCKXCH
author
jjenista
<jjenista>
Tue, 9 Nov 2010 02:25:37 +0000
(
02:25
+0000)
committer
jjenista
<jjenista>
Tue, 9 Nov 2010 02:25:37 +0000
(
02:25
+0000)
Robust/src/Runtime/mlp_lock.h
patch
|
blob
|
history
diff --git
a/Robust/src/Runtime/mlp_lock.h
b/Robust/src/Runtime/mlp_lock.h
index d462534bf934c7c6ada01d29c03cfcb2bd20c1cf..46d8a930797aa9e482a0638ea30f7ccc65ebdf52 100644
(file)
--- a/
Robust/src/Runtime/mlp_lock.h
+++ b/
Robust/src/Runtime/mlp_lock.h
@@
-61,6
+61,11
@@
static inline int LOCKXCHG32(volatile int* ptr, int val){
}
+
+// LOCKXCH atomically does the following:
+// INTPTR retval=*ptr;
+// *ptr=val;
+// return retval
#ifdef BIT64
static inline INTPTR LOCKXCHG(volatile INTPTR * ptr, INTPTR val){
INTPTR retval;