aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-10-10 21:24:10 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:02 +0100
commitaf8365df6966d7ddf3d7c42546a0053717a1d081 (patch)
tree52a918e63b4dddd26000ff5cad8f2381e0463fb5 /src
parente05bf79a5d1e1c1c2f55164485704d7bc3a8ec95 (diff)
Tidy up
Diffstat (limited to 'src')
-rw-r--r--src/calibrate_detector.c2
-rw-r--r--src/cubeit.c1
-rw-r--r--src/facetron.c1
-rw-r--r--src/thread-pool.c2
4 files changed, 2 insertions, 4 deletions
diff --git a/src/calibrate_detector.c b/src/calibrate_detector.c
index 2c68f645..1f413b44 100644
--- a/src/calibrate_detector.c
+++ b/src/calibrate_detector.c
@@ -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
diff --git a/src/cubeit.c b/src/cubeit.c
index ef892340..09a29540 100644
--- a/src/cubeit.c
+++ b/src/cubeit.c
@@ -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);
-
}
diff --git a/src/facetron.c b/src/facetron.c
index 27fc1608..5693a00c 100644
--- a/src/facetron.c
+++ b/src/facetron.c
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <getopt.h>
#include <assert.h>
+#include <pthread.h>
#include "utils.h"
#include "hdf5-file.h"
diff --git a/src/thread-pool.c b/src/thread-pool.c
index 358fb4f3..7781f883 100644
--- a/src/thread-pool.c
+++ b/src/thread-pool.c
@@ -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;
}