mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-11-04 03:15:26 -07:00
fix the read/write lock on Windows
This commit is contained in:
1 parent
dc2a3cb3d4
commit
d32ba0538d
2 files changed
+3
-3
No files matched your search
@@ -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