summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fil0fil.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-04-26 18:59:40 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-04-26 18:59:40 +0300
commit638afc4acf86b32b74b3b37314f2dbd048062814 (patch)
tree7de9e7edb4f45cef5aa8664235270f96bd7eae07 /storage/innobase/include/fil0fil.h
parentee5966c75404fd4e35dde52f1ebb78e3e20ebf77 (diff)
parent2c005261cb7ee12e4da63d7769ba1ebe8f8cdc9f (diff)
downloadmariadb-git-638afc4acf86b32b74b3b37314f2dbd048062814.tar.gz
Merge 10.6 into 10.7
Diffstat (limited to 'storage/innobase/include/fil0fil.h')
-rw-r--r--storage/innobase/include/fil0fil.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index a0c24b928cd..ac07131fc46 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -412,7 +412,7 @@ private:
static constexpr uint32_t PENDING= ~(STOPPING | CLOSING | NEEDS_FSYNC);
/** latch protecting all page allocation bitmap pages */
srw_lock latch;
- os_thread_id_t latch_owner;
+ pthread_t latch_owner;
ut_d(Atomic_relaxed<uint32_t> latch_count;)
public:
/** MariaDB encryption data */
@@ -990,20 +990,20 @@ public:
#ifdef UNIV_DEBUG
bool is_latched() const { return latch_count != 0; }
#endif
- bool is_owner() const { return latch_owner == os_thread_get_curr_id(); }
+ bool is_owner() const { return latch_owner == pthread_self(); }
/** Acquire the allocation latch in exclusive mode */
void x_lock()
{
latch.wr_lock(SRW_LOCK_CALL);
ut_ad(!latch_owner);
- latch_owner= os_thread_get_curr_id();
+ latch_owner= pthread_self();
ut_ad(!latch_count.fetch_add(1));
}
/** Release the allocation latch from exclusive mode */
void x_unlock()
{
ut_ad(latch_count.fetch_sub(1) == 1);
- ut_ad(latch_owner == os_thread_get_curr_id());
+ ut_ad(latch_owner == pthread_self());
latch_owner= 0;
latch.wr_unlock();
}