mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-25 21:54:28 +08:00
mdbx: provide SRWL stub for Windows XP/2000.
Change-Id: I438373a4952298efc88ca4c1a92c88e173b82f98
This commit is contained in:
17
src/osal.h
17
src/osal.h
@@ -560,6 +560,23 @@ LIBMDBX_API void mdbx_txn_unlock(MDBX_env *env);
|
||||
int mdbx_rpid_set(MDBX_env *env);
|
||||
int mdbx_rpid_clear(MDBX_env *env);
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
typedef struct MDBX_srwlock {
|
||||
union {
|
||||
struct {
|
||||
long volatile readerCount;
|
||||
long volatile writerCount;
|
||||
};
|
||||
RTL_SRWLOCK native;
|
||||
};
|
||||
} MDBX_srwlock;
|
||||
|
||||
typedef void(WINAPI *MDBX_srwlock_function)(MDBX_srwlock *);
|
||||
extern MDBX_srwlock_function mdbx_srwlock_Init, mdbx_srwlock_AcquireShared,
|
||||
mdbx_srwlock_ReleaseShared, mdbx_srwlock_AcquireExclusive,
|
||||
mdbx_srwlock_ReleaseExclusive;
|
||||
#endif /* Windows */
|
||||
|
||||
/* Checks reader by pid.
|
||||
*
|
||||
* Returns:
|
||||
|
Reference in New Issue
Block a user