simgear/structure/SGAtomic.cxx: Plug memory leak originating from
wrong atomic fallback operations.
: "=r" (result), "=m" (*mem)
: "0" (-value), "m" (*mem)
: "memory");
- return result;
+ return result - value;
}
unsigned __sync_add_and_fetch_4(volatile void *ptr, unsigned value)
: "=r" (result), "=m" (*mem)
: "0" (value), "m" (*mem)
: "memory");
- return result;
+ return result + value;
}
void __sync_synchronize()