changeset 18:7efe4455deaa

fix
author Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
date Mon, 06 Jan 2014 16:26:54 +0900
parents 4d8d124528f2
children a9534f217a0c
files parallel_processing/ppb_cond_counter/ppb_cond_counter.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/parallel_processing/ppb_cond_counter/ppb_cond_counter.c	Mon Jan 06 16:15:05 2014 +0900
+++ b/parallel_processing/ppb_cond_counter/ppb_cond_counter.c	Mon Jan 06 16:26:54 2014 +0900
@@ -15,7 +15,8 @@
     long id = (long)arg;
 
     pthread_mutex_lock(&mutex);
-    while (thread_num >= MAX_THREAD_NUM) pthread_cond_wait(&cond, &mutex);
+    while (thread_num >= MAX_THREAD_NUM)
+        pthread_cond_wait(&cond, &mutex);
     thread_num++;
     pthread_mutex_unlock(&mutex);