aboutsummaryrefslogtreecommitdiff
path: root/dep/src/zthread/linux/AtomicCount.cxx
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-17 21:54:48 -0600
committermegamage <none@none>2009-02-17 21:54:48 -0600
commit89ba43ef3e3f8d4b563c9e8efaf06bf7f7b44065 (patch)
treefbe73c4d529f195d51b8ca4b62be8443da80becf /dep/src/zthread/linux/AtomicCount.cxx
parentbe53cfe1044d7e913c4c11a7245e2d2846826363 (diff)
parent3931b802f1b8b890a615e5b2a4c0ed70407468d7 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'dep/src/zthread/linux/AtomicCount.cxx')
-rw-r--r--dep/src/zthread/linux/AtomicCount.cxx12
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__