diff options
author | Thomas White <taw@physics.org> | 2015-06-18 13:46:01 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-06-18 13:47:09 +0200 |
commit | edf2ad46f4c0f403b90d3058018a295baa9d0753 (patch) | |
tree | 059e668a733ec62f55137c8eb702075821e427d3 /src/process_image.c | |
parent | 14d8651e663538be7445e74cef9206ce9ab4cf36 (diff) |
Replace semaphore with a mutex
A mutex (in a shared memory segment) is the correct synchronisation
primitive here. I had confused myself...
Diffstat (limited to 'src/process_image.c')
-rw-r--r-- | src/process_image.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/process_image.c b/src/process_image.c index 5ead2c61..783ca464 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -78,7 +78,7 @@ static void try_refine_autoR(struct image *image, Crystal *cr) void process_image(const struct index_args *iargs, struct pattern_args *pargs, Stream *st, int cookie, const char *tmpdir, int results_pipe, - int serial, sem_t *term_sem) + int serial, pthread_mutex_t *term_lock) { float *data_for_measurement; size_t data_size; @@ -260,7 +260,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, iargs->ir_inn, iargs->ir_mid, iargs->ir_out, iargs->int_diag, iargs->int_diag_h, iargs->int_diag_k, iargs->int_diag_l, - term_sem); + term_lock); ret = write_chunk(st, &image, hdfile, iargs->stream_peaks, iargs->stream_refls, |