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

Function unlink_from_queue

mysys/mf_keycache.c:826–850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

824*/
825
826static void unlink_from_queue(KEYCACHE_WQUEUE *wqueue,
827 struct st_my_thread_var *thread)
828{
829 KEYCACHE_DBUG_PRINT("unlink_from_queue", ("thread %ld", thread->id));
830 DBUG_ASSERT(thread->next && thread->prev);
831 if (thread->next == thread)
832 /* The queue contains only one member */
833 wqueue->last_thread= NULL;
834 else
835 {
836 thread->next->prev= thread->prev;
837 *thread->prev=thread->next;
838 if (wqueue->last_thread == thread)
839 wqueue->last_thread= STRUCT_PTR(struct st_my_thread_var, next,
840 thread->prev);
841 }
842 thread->next= NULL;
843#if !defined(DBUG_OFF)
844 /*
845 This makes it easier to see it's not in a chain during debugging.
846 And some DBUG_ASSERT() rely on it.
847 */
848 thread->prev= NULL;
849#endif
850}
851
852
853/*

Callers 2

link_blockFunction · 0.85
unlink_hashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected