MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / TestInterlockedIncrement

Function TestInterlockedIncrement

src/External/CascLib/test/TLogHelper.cpp:46–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44// Local functions
45
46inline 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
57inline DWORD Test_GetLastError()
58{

Callers 1

TimeElapsedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected