diff options
author | megamage <none@none> | 2009-02-18 11:36:19 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-18 11:36:19 -0600 |
commit | 31637d4aac6ae2081ccb3db976cab17936019f1a (patch) | |
tree | a0e098d4afafaddcb901486d00da1563ecd628b9 /dep/src/zthread/linux/AtomicCount.cxx | |
parent | 017f309b5b5b981b6edfe0ae071971d513828a20 (diff) | |
parent | 7bff1c1d60b78ba78f2ab0a9c67bdde80427ea30 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'dep/src/zthread/linux/AtomicCount.cxx')
-rw-r--r-- | dep/src/zthread/linux/AtomicCount.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dep/src/zthread/linux/AtomicCount.cxx b/dep/src/zthread/linux/AtomicCount.cxx index 28c2381c3b4..18b31e3a8ce 100644 --- a/dep/src/zthread/linux/AtomicCount.cxx +++ b/dep/src/zthread/linux/AtomicCount.cxx @@ -47,7 +47,7 @@ typedef struct atomic_count_t { AtomicCount::AtomicCount() { _value = reinterpret_cast<void*>(new ATOMIC_COUNT); - + } AtomicCount::~AtomicCount() { @@ -55,19 +55,19 @@ AtomicCount::~AtomicCount() { delete reinterpret_cast<ATOMIC_COUNT*>(_value); } - + void AtomicCount::increment() { atomic_inc(&reinterpret_cast<ATOMIC_COUNT*>(_value)->count); - + } - + bool AtomicCount::decrement() { return atomic_dec_and_test(&reinterpret_cast<ATOMIC_COUNT*>(_value)->count); - + } - + }; #endif // __ZTATOMICCOUNTIMPL_H__ |