mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
feature request #3432362 (native AtomicCounter for GCC)
This commit is contained in:
@@ -122,6 +122,47 @@ AtomicCounter& AtomicCounter::operator = (AtomicCounter::ValueType value)
|
||||
}
|
||||
|
||||
|
||||
#elif defined(POCO_ARCH_GCC_INTEL_X32_64)
|
||||
//
|
||||
// GCC & Linux
|
||||
//
|
||||
AtomicCounter::AtomicCounter():
|
||||
_counter(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AtomicCounter::AtomicCounter(AtomicCounter::ValueType initialValue):
|
||||
_counter(initialValue)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AtomicCounter::AtomicCounter(const AtomicCounter& counter):
|
||||
_counter(counter.value())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AtomicCounter::~AtomicCounter()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AtomicCounter& AtomicCounter::operator = (const AtomicCounter& counter)
|
||||
{
|
||||
_counter = counter.value();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
AtomicCounter& AtomicCounter::operator = (AtomicCounter::ValueType value)
|
||||
{
|
||||
_counter = value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
//
|
||||
// Generic implementation based on FastMutex
|
||||
|
||||
Reference in New Issue
Block a user