httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@hyperreal.org
Subject cvs commit: apache-apr/pthreads/src/main fdqueue.c
Date Mon, 15 Feb 1999 21:58:59 GMT
manoj       99/02/15 13:58:59

  Modified:    pthreads/src/main fdqueue.c
  Log:
  Fix lockup bug in fdqueue.c. Because of the recent change to make
  queue_pop non-blocking, waits were happening without the corresponding
  signal.
  
  Revision  Changes    Path
  1.6       +3 -1      apache-apr/pthreads/src/main/fdqueue.c
  
  Index: fdqueue.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/pthreads/src/main/fdqueue.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- fdqueue.c	1999/02/12 20:36:59	1.5
  +++ fdqueue.c	1999/02/15 21:58:58	1.6
  @@ -49,7 +49,9 @@
       if (pthread_mutex_lock(&queue->one_big_mutex) != 0) {
           return FD_QUEUE_FAILURE;
       }
  -    pthread_cond_wait(&queue->not_empty, &queue->one_big_mutex);
  +    if (queue->head == queue->tail) {
  +        pthread_cond_wait(&queue->not_empty, &queue->one_big_mutex);
  +    } 
       
       fd = queue->data[queue->head].fd;
       *addr = queue->data[queue->head].addr;
  
  
  

Mime
View raw message