mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-25 06:36:37 +01:00
backport changes from 1.4.3 branch
This commit is contained in:
@@ -122,12 +122,12 @@ AtomicCounter& AtomicCounter::operator = (AtomicCounter::ValueType value)
|
||||
}
|
||||
|
||||
|
||||
#elif defined(POCO_ARCH_GCC_INTEL_X32_64)
|
||||
#elif defined(POCO_HAVE_GCC_ATOMICS)
|
||||
//
|
||||
// GCC & Linux
|
||||
// GCC 4.1+ atomic builtins.
|
||||
//
|
||||
AtomicCounter::AtomicCounter():
|
||||
_counter(0)
|
||||
_counter(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -151,15 +151,15 @@ AtomicCounter::~AtomicCounter()
|
||||
|
||||
AtomicCounter& AtomicCounter::operator = (const AtomicCounter& counter)
|
||||
{
|
||||
_counter = counter.value();
|
||||
return *this;
|
||||
__sync_lock_test_and_set(&_counter, counter.value());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
AtomicCounter& AtomicCounter::operator = (AtomicCounter::ValueType value)
|
||||
{
|
||||
_counter = value;
|
||||
return *this;
|
||||
__sync_lock_test_and_set(&_counter, value);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user