mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-25 21:54:28 +08:00
mdbx: add MDBX_txn.mt_owner and MDBX_THREAD_MISMATCH.
This commit is contained in:
@@ -439,7 +439,6 @@ int mdbx_thread_create(mdbx_thread_t *thread,
|
||||
THREAD_RESULT(THREAD_CALL *start_routine)(void *),
|
||||
void *arg);
|
||||
int mdbx_thread_join(mdbx_thread_t thread);
|
||||
mdbx_tid_t mdbx_thread_self(void);
|
||||
int mdbx_thread_key_create(mdbx_thread_key_t *key);
|
||||
void mdbx_thread_key_delete(mdbx_thread_key_t key);
|
||||
void *mdbx_thread_rthc_get(mdbx_thread_key_t key);
|
||||
@@ -465,6 +464,14 @@ static __inline mdbx_pid_t mdbx_getpid(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline mdbx_tid_t mdbx_thread_self(void) {
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
return GetCurrentThreadId();
|
||||
#else
|
||||
return pthread_self();
|
||||
#endif
|
||||
}
|
||||
|
||||
void mdbx_osal_jitter(bool tiny);
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user