mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 10:42:50 -06:00
the r/w lock is now in the database itself
This commit is contained in:
@@ -54,10 +54,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "ipc.h"
|
||||
#endif
|
||||
|
||||
enum DB_scope_mode {READER_SCOPE, WRITER_SCOPE};
|
||||
|
||||
class PgfDB {
|
||||
@@ -66,9 +62,7 @@ private:
|
||||
const char *filepath;
|
||||
malloc_state* ms;
|
||||
|
||||
#ifndef _WIN32
|
||||
pthread_rwlock_t *rwlock;
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
HANDLE hMap;
|
||||
HANDLE hRWEvent;
|
||||
#endif
|
||||
@@ -114,6 +108,10 @@ private:
|
||||
PGF_INTERNAL_DECL object malloc_internal(size_t bytes);
|
||||
PGF_INTERNAL_DECL void free_internal(object o);
|
||||
|
||||
PGF_INTERNAL_DECL void register_process(bool *is_first);
|
||||
PGF_INTERNAL_DECL void unregister_process();
|
||||
|
||||
|
||||
void lock(DB_scope_mode m);
|
||||
void unlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user