| 44 | // Local functions |
| 45 | |
| 46 | inline DWORD TestInterlockedIncrement(DWORD * PtrValue) |
| 47 | { |
| 48 | #ifdef TEST_PLATFORM_WINDOWS |
| 49 | return (DWORD)InterlockedIncrement((LONG *)(PtrValue)); |
| 50 | #elif defined(__GNUC__) |
| 51 | return __sync_add_and_fetch(PtrValue, 1); |
| 52 | #else |
| 53 | return ++(*PtrValue); |
| 54 | #endif |
| 55 | } |
| 56 | |
| 57 | inline DWORD Test_GetLastError() |
| 58 | { |