MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / read_lock_stack

Function read_lock_stack

dbug/dbug.c:413–420  ·  view source on GitHub ↗

Lock the stack debugging settings. Only the shared (global) settings are locked if necessary, per thread settings are local and safe to use. This lock is re entrant. @sa unlock_stack */

Source from the content-addressed store, hash-verified

411 @sa unlock_stack
412*/
413static void read_lock_stack(CODE_STATE *cs)
414{
415 if (cs->stack == &init_settings)
416 {
417 if (++(cs->m_read_lock_count) == 1)
418 rw_rdlock(&THR_LOCK_init_settings);
419 }
420}
421
422/**
423 Unlock the stack debugging settings.

Callers 9

_db_set_Function · 0.85
_db_push_Function · 0.85
_db_pop_Function · 0.85
_db_explain_Function · 0.85
_db_enter_Function · 0.85
_db_return_Function · 0.85
_db_doprnt_Function · 0.85
_db_dump_Function · 0.85
_db_keyword_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected