mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 06:01:31 +03:00
A pre-requisite patch for the fix for Bug#52044.
Implement a few simple asserts in my_rwlock_t locks. include/my_pthread.h: Declare two simple assert functions. include/mysql/psi/mysql_thread.h: Add wrappers for new assert functions. mysys/thr_rwlock.c: Add asserts. sql/sql_base.cc: Silence a compiler warning for the case when SAFE_MUTEX is not ON.
This commit is contained in:
@ -215,6 +215,14 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
#define mysql_mutex_assert_not_owner(M) \
|
||||
safe_mutex_assert_not_owner(&(M)->m_mutex)
|
||||
|
||||
/** Wrappers for instrumented prlock objects. */
|
||||
|
||||
#define mysql_prlock_assert_write_owner(M) \
|
||||
rw_pr_lock_assert_write_owner(&(M)->m_prlock)
|
||||
|
||||
#define mysql_prlock_assert_not_write_owner(M) \
|
||||
rw_pr_lock_assert_not_write_owner(&(M)->m_prlock)
|
||||
|
||||
/**
|
||||
@def mysql_mutex_init(K, M, A)
|
||||
Instrumented mutex_init.
|
||||
|
Reference in New Issue
Block a user