mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
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;
|
unsigned __int32 temp = ms->rwlock;
|
||||||
if (AllClear(temp)) {
|
if (AllClear(temp)) {
|
||||||
if (InterlockedCompareExchange(&ms->rwlock, SetWriter(temp, true), temp) == temp)
|
if (InterlockedCompareExchange(&ms->rwlock, SetWriter(temp, true), temp) == temp)
|
||||||
return;
|
break;
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
#define PGF_API_DECL EXTERN_C __declspec(dllexport)
|
#define PGF_API_DECL EXTERN_C __declspec(dllexport)
|
||||||
#define PGF_API EXTERN_C __declspec(dllexport)
|
#define PGF_API EXTERN_C __declspec(dllexport)
|
||||||
#elif defined(COMPILING_STATIC_PGF)
|
#elif defined(COMPILING_STATIC_PGF)
|
||||||
#define PGF_API_DECL EXTERN_C __declspec(dllexport)
|
#define PGF_API_DECL EXTERN_C
|
||||||
#define PGF_API EXTERN_C __declspec(dllexport)
|
#define PGF_API EXTERN_C
|
||||||
#else
|
#else
|
||||||
#define PGF_API_DECL __declspec(dllimport)
|
#define PGF_API_DECL __declspec(dllimport)
|
||||||
#define PGF_API ERROR_NOT_COMPILING_LIBPGF
|
#define PGF_API ERROR_NOT_COMPILING_LIBPGF
|
||||||
|
|||||||
Reference in New Issue
Block a user