Commit af8365df authored by Thomas White's avatar Thomas White Committed by Thomas White
Browse files

Tidy up

parent e05bf79a
......@@ -21,7 +21,6 @@
#include <unistd.h>
#include <getopt.h>
#include <pthread.h>
#include <sys/time.h>
#include "utils.h"
#include "hdf5-file.h"
......@@ -31,7 +30,6 @@
#define INTEGRATION_RADIUS (10)
#define MAX_THREADS (96)
typedef enum
......
......@@ -389,7 +389,6 @@ static void write_slice(const char *filename, double *vals, int z,
cairo_surface_write_to_png(surface, filename);
cairo_surface_destroy(surface);
}
......
......@@ -21,6 +21,7 @@
#include <unistd.h>
#include <getopt.h>
#include <assert.h>
#include <pthread.h>
#include "utils.h"
#include "hdf5-file.h"
......
......@@ -162,7 +162,7 @@ static void *task_worker(void *pargsv)
/* Get a task */
pthread_mutex_lock(&q->lock);
if ( q->n_started >= q->max ) {
if ( (q->max) && (q->n_started >= q->max) ) {
pthread_mutex_unlock(&q->lock);
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment