summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2014-01-24 12:00:32 +0900
committerCedric BAIL <cedric.bail@samsung.com>2014-01-24 12:00:32 +0900
commitf5c125dfc286ffc596e2acfe3fde65be41f0e9d9 (patch)
treeda0f6bb363dea11a2dccb1e86071be02a8329b2a /src
parentc09d1c66f823a3337a2f545bc179b729c71885ac (diff)
eina: fix test suite for rwlock... hopefully.
Diffstat (limited to 'src')
-rw-r--r--src/tests/eina/eina_test_lock.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tests/eina/eina_test_lock.c b/src/tests/eina/eina_test_lock.c
index 7c6626eaa7..1b50f6ee12 100644
--- a/src/tests/eina/eina_test_lock.c
+++ b/src/tests/eina/eina_test_lock.c
@@ -152,7 +152,11 @@ _eina_test_rwlock_thread(void *data EINA_UNUSED, Eina_Thread t EINA_UNUSED)
152 counter = 7200; 152 counter = 7200;
153 fail_if(eina_rwlock_release(&mutex) != EINA_LOCK_SUCCEED); 153 fail_if(eina_rwlock_release(&mutex) != EINA_LOCK_SUCCEED);
154 154
155 fail_if(!eina_barrier_wait(&barrier));
156
157 fail_if(eina_lock_take(&mtcond) != EINA_LOCK_SUCCEED);
155 fail_if(!eina_condition_broadcast(&cond)); 158 fail_if(!eina_condition_broadcast(&cond));
159 fail_if(eina_lock_release(&mtcond) != EINA_LOCK_SUCCEED);
156 160
157 return NULL; 161 return NULL;
158} 162}
@@ -183,14 +187,16 @@ START_TEST(eina_test_rwlock)
183 fail_if(eina_rwlock_release(&mutex) != EINA_LOCK_SUCCEED); 187 fail_if(eina_rwlock_release(&mutex) != EINA_LOCK_SUCCEED);
184 188
185 fail_if(eina_lock_take(&mtcond) != EINA_LOCK_SUCCEED); 189 fail_if(eina_lock_take(&mtcond) != EINA_LOCK_SUCCEED);
190 fail_if(!eina_barrier_wait(&barrier));
191
186 fail_if(!eina_condition_wait(&cond)); 192 fail_if(!eina_condition_wait(&cond));
187 fail_if(eina_lock_release(&mtcond) != EINA_LOCK_SUCCEED); 193 fail_if(eina_lock_release(&mtcond) != EINA_LOCK_SUCCEED);
188 194
189 fail_if(eina_rwlock_take_read(&mutex) != EINA_LOCK_SUCCEED); 195 fail_if(eina_rwlock_take_read(&mutex) != EINA_LOCK_SUCCEED);
190 fail_if(counter != 7200); 196 fail_if(counter != 7200);
191 fail_if(eina_rwlock_release(&mutex) != EINA_LOCK_SUCCEED); 197 fail_if(eina_rwlock_release(&mutex) != EINA_LOCK_SUCCEED);
192 198
193 eina_condition_timedwait(&cond, 0.01); 199 /* eina_condition_timedwait(&cond, 0.01); */
194 eina_thread_join(thread); 200 eina_thread_join(thread);
195 201
196 eina_condition_free(&cond); 202 eina_condition_free(&cond);