![]()  | 
  
    MySQL 9.5.0
    
   Source Code Documentation 
   | 
 
Mutex interface for all policy mutexes. More...
#include <ib0mutex.h>
Public Types | |
| typedef MutexImpl | MutexType | 
| typedef MutexImpl::MutexPolicy | Policy | 
Public Member Functions | |
| PolicyMutex () 1 | |
| ~PolicyMutex ()=default | |
| Policy & | policy () 1 | 
| const Policy & | policy () const 1 | 
| void | exit () 1 | 
| Release the mutex.  More... | |
| void | enter (uint32_t n_spins, uint32_t n_delay, const char *name, uint32_t line) 1 | 
| Acquire the mutex.  More... | |
| int | trylock (const char *name, uint32_t line) 1 | 
| Try and lock the mutex, return 0 on SUCCESS and 1 otherwise.  More... | |
| bool | is_owned () const 1 | 
| void | init (latch_id_t id, const char *filename, uint32_t line) 1 | 
| Initialise the mutex.  More... | |
| void | destroy () 1 | 
| Free resources (if any)  More... | |
| operator sys_mutex_t * () 1 | |
| Required for os_event_t.  More... | |
| void | pfs_add (mysql_pfs_key_t key) 1 | 
| Performance schema monitoring - register mutex with PFS.  More... | |
Private Member Functions | |
| PSI_mutex_locker * | pfs_begin_lock (PSI_mutex_locker_state *state, const char *name, uint32_t line) 1 | 
| Performance schema monitoring.  More... | |
| PSI_mutex_locker * | pfs_begin_trylock (PSI_mutex_locker_state *state, const char *name, uint32_t line) 1 | 
| Performance schema monitoring.  More... | |
| void | pfs_end (PSI_mutex_locker *locker, int ret) 1 | 
| Performance schema monitoring.  More... | |
| void | pfs_exit () | 
| Performance schema monitoring - register mutex release.  More... | |
| void | pfs_del () | 
| Performance schema monitoring - deregister.  More... | |
Private Attributes | |
| MutexImpl | m_impl | 
| The mutex implementation.  More... | |
| PSI_mutex * | m_ptr | 
| The performance schema instrumentation hook.  More... | |
Mutex interface for all policy mutexes.
This class handles the interfacing with the Performance Schema instrumentation.
| typedef MutexImpl PolicyMutex< MutexImpl >::MutexType | 
| typedef MutexImpl::MutexPolicy PolicyMutex< MutexImpl >::Policy | 
      
  | 
  inline | 
      
  | 
  default | 
      
  | 
  inline | 
Free resources (if any)
      
  | 
  inline | 
Acquire the mutex.
| n_spins | max number of spins | 
| n_delay | max delay per spin | 
| name | filename where locked | 
| line | line number where locked | 
      
  | 
  inline | 
Release the mutex.
      
  | 
  inline | 
Initialise the mutex.
| [in] | id | Mutex ID | 
| [in] | filename | file where created | 
| [in] | line | line number in file where created | 
      
  | 
  inline | 
      
  | 
  inline | 
Required for os_event_t.
      
  | 
  inline | 
Performance schema monitoring - register mutex with PFS.
Note: This is public only because we want to get around an issue with registering a subset of buffer pool pages with PFS when PFS_GROUP_BUFFER_SYNC is defined. Therefore this has to then be called by external code (see buf0buf.cc).
| key | - Performance Schema key. | 
      
  | 
  inlineprivate | 
Performance schema monitoring.
| state | - PFS locker state | 
| name | - file name where locked | 
| line | - line number in file where locked | 
      
  | 
  inlineprivate | 
Performance schema monitoring.
| state | - PFS locker state | 
| name | - file name where locked | 
| line | - line number in file where locked | 
      
  | 
  inlineprivate | 
Performance schema monitoring - deregister.
      
  | 
  inlineprivate | 
Performance schema monitoring.
| locker | - PFS identifier | 
| ret | - 0 for success and 1 for failure | 
      
  | 
  inlineprivate | 
Performance schema monitoring - register mutex release.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Try and lock the mutex, return 0 on SUCCESS and 1 otherwise.
| name | filename where locked | 
| line | line number where locked | 
      
  | 
  private | 
The mutex implementation.
      
  | 
  private | 
The performance schema instrumentation hook.