diff options
| author | megamage <none@none> | 2009-02-17 21:54:48 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-02-17 21:54:48 -0600 |
| commit | 89ba43ef3e3f8d4b563c9e8efaf06bf7f7b44065 (patch) | |
| tree | fbe73c4d529f195d51b8ca4b62be8443da80becf /dep/src/zthread/win32/AtomicCount.cxx | |
| parent | be53cfe1044d7e913c4c11a7245e2d2846826363 (diff) | |
| parent | 3931b802f1b8b890a615e5b2a4c0ed70407468d7 (diff) | |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'dep/src/zthread/win32/AtomicCount.cxx')
| -rw-r--r-- | dep/src/zthread/win32/AtomicCount.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dep/src/zthread/win32/AtomicCount.cxx b/dep/src/zthread/win32/AtomicCount.cxx index 84cbf8c3ddc..7fe63b0da0c 100644 --- a/dep/src/zthread/win32/AtomicCount.cxx +++ b/dep/src/zthread/win32/AtomicCount.cxx @@ -32,7 +32,7 @@ namespace ZThread { AtomicCount::AtomicCount() { _value = reinterpret_cast<void*>(new LONG(0)); - + } AtomicCount::~AtomicCount() { @@ -41,20 +41,20 @@ AtomicCount::~AtomicCount() { delete reinterpret_cast<LPLONG>(_value); } - + void AtomicCount::increment() { ::InterlockedIncrement(reinterpret_cast<LPLONG>(_value)); - + } - + bool AtomicCount::decrement() { LONG v = ::InterlockedDecrement(reinterpret_cast<LPLONG>(_value)); return static_cast<unsigned long>(v) == 0; - + } - + }; #endif // __ZTATOMICCOUNTIMPL_H__ |
