Fix: pthread_rwlock initialization on Cygwin
[urcu.git] / tests / benchmark / test_urcu_wfcq.c
index d0814cdae08534e1aa2d20bbb257154e5b64677f..84a0d0f69068b90596c967475259f06ae000422b 100644 (file)
@@ -21,8 +21,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
-#include "config.h"
 #include <stdio.h>
 #include <pthread.h>
 #include <stdlib.h>
@@ -260,6 +258,7 @@ static void do_test_splice(enum test_sync sync)
                URCU_TLS(nr_successful_dequeues)++;
                URCU_TLS(nr_dequeues)++;
        }
+       cds_wfcq_destroy(&tmp_head, &tmp_tail);
 }
 
 static void *thr_dequeuer(void *_count)
@@ -491,8 +490,10 @@ int main(int argc, char **argv)
 
        for (i = 0; i < duration; i++) {
                sleep(1);
-               if (verbose_mode)
-                       write (1, ".", 1);
+               if (verbose_mode) {
+                       fwrite(".", sizeof(char), 1, stdout);
+                       fflush(stdout);
+               }
        }
 
        test_stop_enqueue = 1;
@@ -573,6 +574,7 @@ int main(int argc, char **argv)
                        tot_dequeue_last);
                retval = 1;
        }
+       cds_wfcq_destroy(&head, &tail);
        free(count_enqueuer);
        free(count_dequeuer);
        free(tid_enqueuer);
This page took 0.022914 seconds and 4 git commands to generate.