Added missing __sync_fetch_and_add() definition in Windows

This commit is contained in:
Luca Deri
2022-02-02 10:36:50 +01:00
parent 46bd093934
commit cd3d720ae3
+3
View File
@@ -82,4 +82,7 @@ typedef unsigned __int64 u_int64_t;
#define sleep(a /* sec */) Sleep(1000*a /* ms */)
/* https://stackoverflow.com/questions/7993050/multiplatform-atomic-increment */
#define __sync_fetch_and_add(a,b) InterlockedExchangeAdd ((a), b)
#endif /* __NDPI_WIN32_H__ */