aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Flebbe <of@oflebbe.de>2015-10-05 20:59:13 +0000
committerOlaf Flebbe <of@oflebbe.de>2015-10-09 20:26:56 +0200
commit8048c8e960fab8db89f376646e08bd6c048a937b (patch)
treeb58ec4a78661b2620cc1a96c4d0f410832662658
parent2a6fa3adf64ad1c82e208d0279bc82e3c8344f77 (diff)
downloadbigtop-odpi-8048c8e960fab8db89f376646e08bd6c048a937b.tar.gz
BIGTOP-2082: Remove x86 Assembler Code from zookeeper
-rw-r--r--bigtop-packages/src/common/zookeeper/patch4-removeasm.diff17
1 files changed, 17 insertions, 0 deletions
diff --git a/bigtop-packages/src/common/zookeeper/patch4-removeasm.diff b/bigtop-packages/src/common/zookeeper/patch4-removeasm.diff
new file mode 100644
index 00000000..65996170
--- /dev/null
+++ b/bigtop-packages/src/common/zookeeper/patch4-removeasm.diff
@@ -0,0 +1,17 @@
+--- zookeeper-3.4.6/src/c/src/mt_adaptor.c.ORG 2015-10-05 20:50:36.662228733 +0000
++++ zookeeper-3.4.6/src/c/src/mt_adaptor.c 2015-10-05 20:51:35.722773398 +0000
+@@ -483,13 +483,7 @@
+ int32_t fetch_and_add(volatile int32_t* operand, int incr)
+ {
+ #ifndef WIN32
+- int32_t result;
+- asm __volatile__(
+- "lock xaddl %0,%1\n"
+- : "=r"(result), "=m"(*(int *)operand)
+- : "0"(incr)
+- : "memory");
+- return result;
++ return __sync_fetch_and_add(operand, incr);
+ #else
+ volatile int32_t result;
+ _asm