소스 검색

fix the use of condition variable in the lu decomposition example

Cédric Augonnet 16 년 전
부모
커밋
3d558ebc67
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      examples/heat/dw_factolu.c

+ 2 - 0
examples/heat/dw_factolu.c

@@ -320,6 +320,7 @@ void dw_callback_v2_codelet_update_u11(void *argcb)
 	{
 		/* we are done : wake the application up  */
 		pthread_mutex_lock(&mutex);
+		finished = 1;
 		pthread_cond_signal(&cond);
 		pthread_mutex_unlock(&mutex);
 		return;
@@ -425,6 +426,7 @@ void dw_callback_codelet_update_u11(void *argcb)
 	{
 		/* we are done : wake the application up  */
 		pthread_mutex_lock(&mutex);
+		finished = 1;
 		pthread_cond_signal(&cond);
 		pthread_mutex_unlock(&mutex);
 		return;