MySQL 8.0.40
Source Code Documentation
|
Class implementing buf_pool->LRU hazard pointer. More...
#include <buf0buf.h>
Public Member Functions | |
LRUHp (const buf_pool_t *buf_pool, const ib_mutex_t *mutex) | |
Constructor. More... | |
~LRUHp () override=default | |
Destructor. More... | |
void | adjust (const buf_page_t *bpage) override |
Adjust the value of hp. More... | |
Public Member Functions inherited from HazardPointer | |
HazardPointer (const buf_pool_t *buf_pool, const ib_mutex_t *mutex) | |
Constructor. More... | |
virtual | ~HazardPointer ()=default |
Destructor. More... | |
buf_page_t * | get () const |
Get current value. More... | |
void | set (buf_page_t *bpage) |
Set current value. More... | |
bool | is_hp (const buf_page_t *bpage) |
Checks if a bpage is the hp. More... | |
void | move (const buf_page_t *bpage, buf_page_t *dpage) |
Adjust the value of hp for moving. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from HazardPointer | |
HazardPointer (const HazardPointer &) | |
Disable copying. More... | |
HazardPointer & | operator= (const HazardPointer &) |
Protected Attributes inherited from HazardPointer | |
const buf_pool_t * | m_buf_pool |
Buffer pool instance. More... | |
const ib_mutex_t * | m_mutex |
mutex that protects access to the m_hp. More... | |
buf_page_t * | m_hp |
hazard pointer. More... | |
Class implementing buf_pool->LRU hazard pointer.
|
inline |
Constructor.
buf_pool | buffer pool instance |
mutex | mutex that is protecting the hp. |
|
overridedefault |
Destructor.
|
overridevirtual |
Adjust the value of hp.
This happens when some other thread working on the same list attempts to remove the hp from the list.
bpage | buffer block to be compared |
We only support reverse traversal for now.
Implements HazardPointer.