forked from GitHub/gf-core
fix the read/write lock on Windows
This commit is contained in:
@@ -1752,7 +1752,7 @@ void PgfDB::resize_map(size_t new_size, bool writeable)
|
||||
unsigned __int32 temp = ms->rwlock;
|
||||
if (AllClear(temp)) {
|
||||
if (InterlockedCompareExchange(&ms->rwlock, SetWriter(temp, true), temp) == temp)
|
||||
return;
|
||||
break;
|
||||
else
|
||||
continue;
|
||||
} else {
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#define PGF_API_DECL EXTERN_C __declspec(dllexport)
|
||||
#define PGF_API EXTERN_C __declspec(dllexport)
|
||||
#elif defined(COMPILING_STATIC_PGF)
|
||||
#define PGF_API_DECL EXTERN_C __declspec(dllexport)
|
||||
#define PGF_API EXTERN_C __declspec(dllexport)
|
||||
#define PGF_API_DECL EXTERN_C
|
||||
#define PGF_API EXTERN_C
|
||||
#else
|
||||
#define PGF_API_DECL __declspec(dllimport)
|
||||
#define PGF_API ERROR_NOT_COMPILING_LIBPGF
|
||||
|
||||
Reference in New Issue
Block a user