From 4f4a4cf9eb10fe29fb79a8321a5661d679659dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sun, 7 Feb 2021 12:19:24 +0200 Subject: 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. --- storage/innobase/buf/buf0buf.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'storage/innobase/buf/buf0buf.cc') 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; } -- cgit v1.2.1