diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-02-07 12:19:24 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-02-07 12:19:24 +0200 |
commit | 4f4a4cf9eb10fe29fb79a8321a5661d679659dec (patch) | |
tree | a0939ab32bfa6ae1c3f7fb2e471daf1461dbfa97 /storage/innobase/buf/buf0buf.cc | |
parent | 7ce643782ba32dda0c9e5cc98efa55d0ab48cb03 (diff) | |
download | mariadb-git-4f4a4cf9eb10fe29fb79a8321a5661d679659dec.tar.gz |
MDEV-23399 fixup: Use plain pthread_cond
The condition variables that were introduced in
commit 7cffb5f6e8a231a041152447be8980ce35d2c9b8 (MDEV-23399)
are never instrumented with PERFORMANCE_SCHEMA.
Let us avoid the storage overhead and dead code.
Diffstat (limited to 'storage/innobase/buf/buf0buf.cc')
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index e740db82d38..d531be43a8b 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -1462,9 +1462,9 @@ bool buf_pool_t::create() mysql_mutex_init(flush_list_mutex_key, &flush_list_mutex, MY_MUTEX_INIT_FAST); - mysql_cond_init(0, &done_flush_LRU, nullptr); - mysql_cond_init(0, &done_flush_list, nullptr); - mysql_cond_init(0, &do_flush_list, nullptr); + pthread_cond_init(&done_flush_LRU, nullptr); + pthread_cond_init(&done_flush_list, nullptr); + pthread_cond_init(&do_flush_list, nullptr); try_LRU_scan= true; @@ -1525,9 +1525,9 @@ void buf_pool_t::close() allocator.deallocate_large_dodump(chunk->mem, &chunk->mem_pfx); } - mysql_cond_destroy(&done_flush_LRU); - mysql_cond_destroy(&done_flush_list); - mysql_cond_destroy(&do_flush_list); + pthread_cond_destroy(&done_flush_LRU); + pthread_cond_destroy(&done_flush_list); + pthread_cond_destroy(&do_flush_list); ut_free(chunks); chunks= nullptr; @@ -3694,8 +3694,8 @@ loop: We must not hold buf_pool.mutex while waiting. */ timespec abstime; set_timespec_nsec(abstime, 1000000); - mysql_cond_timedwait(&buf_pool.done_flush_list, &buf_pool.mutex, - &abstime); + my_cond_timedwait(&buf_pool.done_flush_list, &buf_pool.mutex.m_mutex, + &abstime); } mtr_memo_push(mtr, block, MTR_MEMO_PAGE_X_FIX); } @@ -3719,8 +3719,8 @@ loop: /* Wait for buf_page_write_complete() to release the I/O fix. */ timespec abstime; set_timespec_nsec(abstime, 1000000); - mysql_cond_timedwait(&buf_pool.done_flush_list, &buf_pool.mutex, - &abstime); + my_cond_timedwait(&buf_pool.done_flush_list, &buf_pool.mutex.m_mutex, + &abstime); goto loop; } |