| 824 | */ |
| 825 | |
| 826 | static 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 | /* |
no outgoing calls
no test coverage detected