Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /tests/rwlock3.c [e51657] .. [aac54e] Maximize Restore

  Switch to side-by-side view

--- a/tests/rwlock3.c
+++ b/tests/rwlock3.c
@@ -37,6 +37,8 @@
  * and then unlock it again.
  *
  * Depends on API functions: 
+ *	pthread_create()
+ *	pthread_join()
  *	pthread_rwlock_wrlock()
  *	pthread_rwlock_trywrlock()
  *	pthread_rwlock_unlock()
@@ -66,7 +68,7 @@
 
   assert(pthread_create(&t, NULL, func, NULL) == 0);
 
-  Sleep(20);
+  assert(pthread_join(t, NULL) == 0);
 
   assert(pthread_rwlock_unlock(&rwlock1) == 0);