Browse Source

Debug code fixed.

pull/374/head
unknown 18 years ago
parent
commit
86b7194c18
  1. 9
      mysys/wqueue.c

9
mysys/wqueue.c

@ -67,6 +67,9 @@ void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread)
thread->next= last->next; thread->next= last->next;
last->next= thread; last->next= thread;
} }
#ifndef DBUG_OFF
thread->prev= NULL; /* force segfault if used */
#endif
wqueue->last_thread= thread; wqueue->last_thread= thread;
} }
@ -156,9 +159,6 @@ void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue)
{ {
/* release first waiting for write lock */ /* release first waiting for write lock */
pthread_cond_signal(&next->suspend); pthread_cond_signal(&next->suspend);
#ifndef DBUG_OFF
next->prev= NULL; /* force segfault if used */
#endif
if (next == last) if (next == last)
wqueue->last_thread= NULL; wqueue->last_thread= NULL;
else else
@ -170,9 +170,6 @@ void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue)
{ {
thread= next; thread= next;
next= thread->next; next= thread->next;
#ifndef DBUG_OFF
thread->prev= NULL; /* force segfault if used */
#endif
if (thread->lock_type == MY_PTHREAD_LOCK_WRITE) if (thread->lock_type == MY_PTHREAD_LOCK_WRITE)
{ {
/* skip waiting for write lock */ /* skip waiting for write lock */

Loading…
Cancel
Save