2023-07-21 00:35:39 -03:00
|
|
|
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
inline LONG InterlockedIncrement(LONG volatile *p)
|
|
|
|
{
|
|
|
|
return __sync_add_and_fetch(p, 1);
|
|
|
|
}
|
2024-03-06 04:13:49 -03:00
|
|
|
|
|
|
|
inline LONG InterlockedDecrement(LONG volatile *p)
|
|
|
|
{
|
|
|
|
return __sync_sub_and_fetch(p, 1);
|
|
|
|
}
|