Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Fix atomic add and atomic subtract. Now passes tests."

This reverts commit ee92ffd.

Do not make platform wide changes without first doing a pull/req.
This commit might be right or wrong but doing it without discussion
is most defiantly wrong.

While we are discussing this, why are you commiting GSoC work
directly into mainline ? The standard proceedure is to perform
the GSoC work, then once it is finished, it gets submitted as
as pull/req and then, once approved, then and only then does
it get committed into mainline.
  • Loading branch information...
commit aa3494cf221bafcd0cf244fcb11921e443f77bdc 1 parent b55e0c0
@davilla authored
Showing with 0 additions and 38 deletions.
  1. +0 −38 xbmc/threads/Atomics.cpp
View
38 xbmc/threads/Atomics.cpp
@@ -306,25 +306,6 @@ long AtomicAdd(volatile long* pAddr, long amount)
return amount;
}
-#elif defined(__GNUC__)
-
-long AtomicAdd(volatile long* pAddr, long amount)
-{
- return __sync_add_and_fetch(pAddr, amount);
-}
-
-#elif defined(__x86_64__)
-
-long AtomicAdd(volatile long* pAddr, long amount)
-{
- register long result;
- __asm__ __volatile__ (
- "lock/xaddq %q0, %1"
- : "=r" (result), "=m" (*pAddr)
- : "0" ((long) (amount)), "m" (*pAddr));
- return *pAddr;
-}
-
#else // Linux / OSX86 (GCC)
long AtomicAdd(volatile long* pAddr, long amount)
@@ -485,25 +466,6 @@ long AtomicSubtract(volatile long* pAddr, long amount)
return amount;
}
-#elif defined(__GNUC__)
-
-long AtomicSubtract(volatile long* pAddr, long amount)
-{
- return __sync_sub_and_fetch(pAddr, amount);
-}
-
-#elif defined(__x86_64__)
-
-long AtomicSubtract(volatile long* pAddr, long amount)
-{
- register long result;
- __asm__ __volatile__ (
- "lock/xaddq %q0, %1"
- : "=r" (result), "=m" (*pAddr)
- : "0" ((long) (-1 * amount)), "m" (*pAddr));
- return *pAddr;
-}
-
#else // Linux / OSX86 (GCC)
long AtomicSubtract(volatile long* pAddr, long amount)
Please sign in to comment.
Something went wrong with that request. Please try again.