diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-30 14:28:11 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-30 14:28:11 +0300 |
commit | a9550c47e4e32f2df8816477e362315608194443 (patch) | |
tree | cc0e7ca066095eafccacfcb1240071795c689708 /storage/innobase/ut | |
parent | c7399db64508a55bb3d486c789e7386899d88fbe (diff) | |
download | mariadb-git-a9550c47e4e32f2df8816477e362315608194443.tar.gz |
MDEV-16264 fixup: Remove unused code and data
LATCH_ID_OS_AIO_READ_MUTEX,
LATCH_ID_OS_AIO_WRITE_MUTEX,
LATCH_ID_OS_AIO_LOG_MUTEX,
LATCH_ID_OS_AIO_IBUF_MUTEX,
LATCH_ID_OS_AIO_SYNC_MUTEX: Remove. The tpool is not instrumented.
lock_set_timeout_event(): Remove.
srv_sys_mutex_key, srv_sys_t::mutex, SYNC_THREADS: Remove.
srv_slot_t::suspended: Remove. We only ever assigned this data member
true, so it is redundant.
ib_wqueue_wait(), ib_wqueue_timedwait(): Remove.
os_thread_join(): Remove.
os_thread_create(), os_thread_exit(): Remove redundant parameters.
These were missed in commit 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02.
Diffstat (limited to 'storage/innobase/ut')
-rw-r--r-- | storage/innobase/ut/ut0wqueue.cc | 82 |
1 files changed, 1 insertions, 81 deletions
diff --git a/storage/innobase/ut/ut0wqueue.cc b/storage/innobase/ut/ut0wqueue.cc index ae97009430e..b56952f27d5 100644 --- a/storage/innobase/ut/ut0wqueue.cc +++ b/storage/innobase/ut/ut0wqueue.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2006, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2019, MariaDB Corporation. +Copyright (c) 2019, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -83,86 +83,6 @@ ib_wqueue_add(ib_wqueue_t* wq, void* item, mem_heap_t* heap, bool wq_locked) } } -/****************************************************************//** -Wait for a work item to appear in the queue. -@return work item */ -void* -ib_wqueue_wait( -/*===========*/ - ib_wqueue_t* wq) /*!< in: work queue */ -{ - ib_list_node_t* node; - - for (;;) { - os_event_wait(wq->event); - - mutex_enter(&wq->mutex); - - node = ib_list_get_first(wq->items); - - if (node) { - ib_list_remove(wq->items, node); - - if (!ib_list_get_first(wq->items)) { - /* We must reset the event when the list - gets emptied. */ - os_event_reset(wq->event); - } - - break; - } - - mutex_exit(&wq->mutex); - } - - mutex_exit(&wq->mutex); - - return(node->data); -} - - -/******************************************************************** -Wait for a work item to appear in the queue for specified time. */ -void* -ib_wqueue_timedwait( -/*================*/ - /* out: work item or NULL on timeout*/ - ib_wqueue_t* wq, /* in: work queue */ - ulint wait_in_usecs) /* in: wait time in micro seconds */ -{ - ib_list_node_t* node = NULL; - - for (;;) { - ulint error; - int64_t sig_count; - - mutex_enter(&wq->mutex); - - node = ib_list_get_first(wq->items); - - if (node) { - ib_list_remove(wq->items, node); - - mutex_exit(&wq->mutex); - break; - } - - sig_count = os_event_reset(wq->event); - - mutex_exit(&wq->mutex); - - error = os_event_wait_time_low(wq->event, - (ulint) wait_in_usecs, - sig_count); - - if (error == OS_SYNC_TIME_EXCEEDED) { - break; - } - } - - return(node ? node->data : NULL); -} - /******************************************************************** Return first item on work queue or NULL if queue is empty @return work item or NULL */ |