![]() ![]() |
![]() |
File: [Pegasus] / pegasus / src / Pegasus / Common / Attic / Atomic_WIN32_IX86_MSVC.h
(download)
Revision: 1.1.2.2, Mon Oct 10 14:46:47 2005 UTC (18 years, 8 months ago) by mike Branch: NNPEGASUS_2_5_0_PerformanceDev-String-branch Changes since 1.1.2.1: +2 -2 lines BUG#: 4200 TITLE: String Optimizations DESCRIPTION: Fixed syntax error in atomic type for Windows. |
#ifndef _Pegasus_Common_Atomic_WIN32_IX86_MSVC_h #define _Pegasus_Common_Atomic_WIN32_IX86_MSVC_h #include <Pegasus/Common/Config.h> #include <windows.h> PEGASUS_NAMESPACE_BEGIN typedef LONG Atomic; inline void Atomic_create(Atomic* atomic, int x) { *atomic = LONG(x); } inline void Atomic_destroy(Atomic* atomic) { } inline int Atomic_get(const Atomic* atomic) { return int(*atomic); } inline void Atomic_set(Atomic* atomic, int x) { *atomic = LONG(x); } inline void Atomic_inc(Atomic* atomic) { InterlockedIncrement(atomic); } inline int Atomic_dec_and_test(Atomic* atomic) { return InterlockedDecrement(atomic) == 0; } PEGASUS_NAMESPACE_END #endif /* _Pegasus_Common_Atomic_WIN32_IX86_MSVC_h */
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |