mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-29 08:58:48 +08:00
mdbx: minor fix debug-output for mdbx_thread_key_create().
Change-Id: I718130cf2385b6221187cbcdeedd9d48d05289bb
This commit is contained in:
parent
f08c7ccac0
commit
797ae9d1db
@ -210,13 +210,15 @@ static __cold void mdbx_rthc_unlock(void) {
|
||||
}
|
||||
|
||||
static __inline int mdbx_thread_key_create(mdbx_thread_key_t *key) {
|
||||
int rc;
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
*key = TlsAlloc();
|
||||
return (*key != TLS_OUT_OF_INDEXES) ? MDBX_SUCCESS : GetLastError();
|
||||
rc = (*key != TLS_OUT_OF_INDEXES) ? MDBX_SUCCESS : GetLastError();
|
||||
#else
|
||||
return pthread_key_create(key, nullptr);
|
||||
rc = pthread_key_create(key, nullptr);
|
||||
#endif
|
||||
mdbx_trace("&key = %p, value 0x%x", key, (unsigned)*key);
|
||||
mdbx_trace("&key = %p, value 0x%x, rc %d", key, (unsigned)*key, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static __inline void mdbx_thread_key_delete(mdbx_thread_key_t key) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user