just an explanation of LOCKXCH
authorjjenista <jjenista>
Tue, 9 Nov 2010 02:25:37 +0000 (02:25 +0000)
committerjjenista <jjenista>
Tue, 9 Nov 2010 02:25:37 +0000 (02:25 +0000)
Robust/src/Runtime/mlp_lock.h

index d462534bf934c7c6ada01d29c03cfcb2bd20c1cf..46d8a930797aa9e482a0638ea30f7ccc65ebdf52 100644 (file)
@@ -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;