|
From: <sv...@va...> - 2007-11-01 14:04:42
|
Author: sewardj
Date: 2007-11-01 14:04:43 +0000 (Thu, 01 Nov 2007)
New Revision: 7074
Log:
At least allow this to compile on non x86/amd64 platforms.
Modified:
branches/THRCHECK/thrcheck/tests/tc11_XCHG.c
Modified: branches/THRCHECK/thrcheck/tests/tc11_XCHG.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc11_XCHG.c 2007-11-01 14:04:01 UTC (rev 7073)
+++ branches/THRCHECK/thrcheck/tests/tc11_XCHG.c 2007-11-01 14:04:43 UTC (rev 7074)
@@ -46,7 +46,13 @@
: "memory", "cc" \
)
#else
-# error "Fix Me for this platform"
+# define XCHG_M_R(_addr,_lval) \
+ do { int tmp = *(int*)(& _addr); \
+ *(int*)(& _addr) = (_lval); \
+ _lval = tmp; \
+ } while (0)
+# define XCHG_M_R_with_redundant_LOCK(_addr,_lval) \
+ XCHG_M_R(_addr,_lval)
#endif
int x = 0;
|