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

Function rc_unlock

mysys/waiting_threads.c:444–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442 DBUG_PRINT("wt", ("LOCK resid=%ld for WRITE", (ulong)rc->id.value));
443}
444static void rc_unlock(WT_RESOURCE *rc)
445{
446 DBUG_PRINT("wt", ("UNLOCK resid=%ld", (ulong)rc->id.value));
447 mysql_mutex_lock(&rc->lock.mutex);
448 if (rc->lock.write_locked)
449 {
450 rc->lock.write_locked= 0;
451 mysql_cond_broadcast(&rc->lock.cond);
452 }
453 else if (--rc->lock.readers == 0)
454 mysql_cond_broadcast(&rc->lock.cond);
455 mysql_mutex_unlock(&rc->lock.mutex);
456}
457#else
458static void rc_rwlock_init(WT_RESOURCE *rc)
459{

Callers 6

change_victimFunction · 0.85
deadlock_searchFunction · 0.85
deadlockFunction · 0.85
wt_thd_will_wait_forFunction · 0.85
wt_thd_cond_timedwaitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected