summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/SIZES.GCE28
-rw-r--r--tests/barrier3.c2
-rw-r--r--tests/barrier5.c2
-rw-r--r--tests/cancel2.c2
-rw-r--r--tests/cleanup0.c2
-rw-r--r--tests/cleanup1.c2
-rw-r--r--tests/cleanup2.c2
-rw-r--r--tests/cleanup3.c2
-rw-r--r--tests/condvar1_2.c2
-rw-r--r--tests/condvar2_1.c2
-rw-r--r--tests/condvar3_1.c2
-rw-r--r--tests/condvar3_2.c2
-rw-r--r--tests/delay2.c2
-rw-r--r--tests/exception1.c2
-rw-r--r--tests/exception2.c2
-rw-r--r--tests/join0.c2
-rw-r--r--tests/join1.c2
-rw-r--r--tests/join2.c2
-rw-r--r--tests/join3.c2
-rw-r--r--tests/mutex6e.c2
-rw-r--r--tests/mutex6es.c2
-rw-r--r--tests/mutex6r.c2
-rw-r--r--tests/mutex6rs.c2
-rw-r--r--tests/mutex7e.c2
-rw-r--r--tests/mutex7r.c2
-rw-r--r--tests/rwlock6.c6
-rw-r--r--tests/rwlock6_t.c8
-rw-r--r--tests/semaphore1.c4
-rw-r--r--tests/semaphore4.c2
29 files changed, 48 insertions, 48 deletions
diff --git a/tests/SIZES.GCE b/tests/SIZES.GCE
index a9ea64d..7048d3a 100755
--- a/tests/SIZES.GCE
+++ b/tests/SIZES.GCE
@@ -1,21 +1,21 @@
-Sizes of pthreads-win32 structs
--------------------------------
+Sizes of pthreads-win32 structs
+-------------------------------
pthread_t 8
ptw32_thread_t 76
- pthread_attr_t_ 28
+ pthread_attr_t_ 28
sem_t_ 12
pthread_mutex_t_ 24
- pthread_mutexattr_t_ 8
- pthread_spinlock_t_ 8
+ pthread_mutexattr_t_ 8
+ pthread_spinlock_t_ 8
pthread_barrier_t_ 36
- pthread_barrierattr_t_ 4
- pthread_key_t_ 16
- pthread_cond_t_ 32
- pthread_condattr_t_ 4
- pthread_rwlock_t_ 28
- pthread_rwlockattr_t_ 4
+ pthread_barrierattr_t_ 4
+ pthread_key_t_ 16
+ pthread_cond_t_ 32
+ pthread_condattr_t_ 4
+ pthread_rwlock_t_ 28
+ pthread_rwlockattr_t_ 4
pthread_once_t_ 16
- ptw32_cleanup_t 12
+ ptw32_cleanup_t 12
ptw32_mcs_node_t_ 16
- sched_param 4
--------------------------------
+ sched_param 4
+-------------------------------
diff --git a/tests/barrier3.c b/tests/barrier3.c
index f65b60c..dece770 100644
--- a/tests/barrier3.c
+++ b/tests/barrier3.c
@@ -60,7 +60,7 @@ main()
assert(pthread_create(&t, NULL, func, NULL) == 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert((int)(size_t)result == PTHREAD_BARRIER_SERIAL_THREAD);
diff --git a/tests/barrier5.c b/tests/barrier5.c
index 7810638..3533840 100644
--- a/tests/barrier5.c
+++ b/tests/barrier5.c
@@ -103,7 +103,7 @@ main()
serialThreadsTotal = 0;
for (i = 1; i <= j; i++)
{
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
serialThreadsTotal += (int)(size_t)result;
}
diff --git a/tests/cancel2.c b/tests/cancel2.c
index 4669a28..d7c7f86 100644
--- a/tests/cancel2.c
+++ b/tests/cancel2.c
@@ -219,7 +219,7 @@ main()
int fail = 0;
void* result = (void*)0;
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
fail = ((int)(size_t)result != (int) PTHREAD_CANCELED);
if (fail)
{
diff --git a/tests/cleanup0.c b/tests/cleanup0.c
index c840afe..d9fbedc 100644
--- a/tests/cleanup0.c
+++ b/tests/cleanup0.c
@@ -191,7 +191,7 @@ main()
int fail = 0;
void* result = (void*)0;
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
fail = ((int)(size_t)result == (int) PTHREAD_CANCELED);
diff --git a/tests/cleanup1.c b/tests/cleanup1.c
index b326549..30d4940 100644
--- a/tests/cleanup1.c
+++ b/tests/cleanup1.c
@@ -205,7 +205,7 @@ main()
int fail = 0;
void* result = (void*)0;
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
fail = ((int)(size_t)result != (int) PTHREAD_CANCELED);
diff --git a/tests/cleanup2.c b/tests/cleanup2.c
index fa32b69..67037c2 100644
--- a/tests/cleanup2.c
+++ b/tests/cleanup2.c
@@ -180,7 +180,7 @@ main()
int fail = 0;
void* result = (void*)0;
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
fail = ((int)(size_t)result != 0);
diff --git a/tests/cleanup3.c b/tests/cleanup3.c
index 575ffbd..62317b3 100644
--- a/tests/cleanup3.c
+++ b/tests/cleanup3.c
@@ -185,7 +185,7 @@ main()
int fail = 0;
void* result = (void*)0;
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
fail = ((int)(size_t)result != 0);
diff --git a/tests/condvar1_2.c b/tests/condvar1_2.c
index b985c5d..3d961f0 100644
--- a/tests/condvar1_2.c
+++ b/tests/condvar1_2.c
@@ -116,7 +116,7 @@ main()
}
while (j > 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert ((int)(size_t)result == 0);
}
diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c
index 7d938f8..7607abd 100644
--- a/tests/condvar2_1.c
+++ b/tests/condvar2_1.c
@@ -136,7 +136,7 @@ main()
for (i = 1; i <= NUMTHREADS; i++)
{
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
assert((int)(size_t)result == i);
}
diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c
index e747a01..bc539d5 100644
--- a/tests/condvar3_1.c
+++ b/tests/condvar3_1.c
@@ -172,7 +172,7 @@ main()
for (i = 1; i <= NUMTHREADS; i++)
{
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
assert((int)(size_t)result == i);
}
diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c
index 399faec..192b842 100644
--- a/tests/condvar3_2.c
+++ b/tests/condvar3_2.c
@@ -156,7 +156,7 @@ main()
for (i = 1; i <= NUMTHREADS; i++)
{
- assert(pthread_join(t[i], (void *) &result) == 0);
+ assert(pthread_join(t[i], &result) == 0);
assert((int)(size_t)result == i);
/*
* Approximately 2/3rds of the threads are expected to time out.
diff --git a/tests/delay2.c b/tests/delay2.c
index 2551336..071b837 100644
--- a/tests/delay2.c
+++ b/tests/delay2.c
@@ -74,7 +74,7 @@ main(int argc, char * argv[])
assert(pthread_mutex_unlock(&mx) == 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert(result == (void*)PTHREAD_CANCELED);
return 0;
diff --git a/tests/exception1.c b/tests/exception1.c
index a18e078..62a5a63 100644
--- a/tests/exception1.c
+++ b/tests/exception1.c
@@ -235,7 +235,7 @@ main()
failed = (failed || fail);
/* Exceptioned thread */
- assert(pthread_join(et[i], (void *) &result) == 0);
+ assert(pthread_join(et[i], &result) == 0);
assert(!(fail = (result != (void*)((int)(size_t)PTHREAD_CANCELED + 2))));
failed = (failed || fail);
diff --git a/tests/exception2.c b/tests/exception2.c
index 222d305..faf677d 100644
--- a/tests/exception2.c
+++ b/tests/exception2.c
@@ -113,7 +113,7 @@ exceptionedThread(void * arg)
}
int
-main(int argc, char argv[])
+main(int argc, char* argv[])
{
int i;
pthread_t mt;
diff --git a/tests/join0.c b/tests/join0.c
index 3519f53..d888e9d 100644
--- a/tests/join0.c
+++ b/tests/join0.c
@@ -58,7 +58,7 @@ main(int argc, char * argv[])
/* Create a single thread and wait for it to exit. */
assert(pthread_create(&id, NULL, func, (void *) 123) == 0);
- assert(pthread_join(id, (void *) &result) == 0);
+ assert(pthread_join(id, &result) == 0);
assert((int)(size_t)result == 123);
diff --git a/tests/join1.c b/tests/join1.c
index 631b604..337af83 100644
--- a/tests/join1.c
+++ b/tests/join1.c
@@ -69,7 +69,7 @@ main(int argc, char * argv[])
for (i = 0; i < 4; i++)
{
- assert(pthread_join(id[i], (void *) &result) == 0);
+ assert(pthread_join(id[i], &result) == 0);
assert((int)(size_t)result == i);
}
diff --git a/tests/join2.c b/tests/join2.c
index 82682a8..b3b85ee 100644
--- a/tests/join2.c
+++ b/tests/join2.c
@@ -60,7 +60,7 @@ main(int argc, char * argv[])
for (i = 0; i < 4; i++)
{
- assert(pthread_join(id[i], (void *) &result) == 0);
+ assert(pthread_join(id[i], &result) == 0);
assert((int)(size_t)result == i);
}
diff --git a/tests/join3.c b/tests/join3.c
index acdc5fe..44380ac 100644
--- a/tests/join3.c
+++ b/tests/join3.c
@@ -66,7 +66,7 @@ main(int argc, char * argv[])
for (i = 0; i < 4; i++)
{
- assert(pthread_join(id[i], (void *) &result) == 0);
+ assert(pthread_join(id[i], &result) == 0);
assert((int)(size_t)result == i);
}
diff --git a/tests/mutex6e.c b/tests/mutex6e.c
index dc6e853..3f28ee7 100644
--- a/tests/mutex6e.c
+++ b/tests/mutex6e.c
@@ -86,7 +86,7 @@ main()
assert(pthread_create(&t, NULL, locker, NULL) == 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert((int)(size_t)result == 555);
assert(lockCount == 2);
diff --git a/tests/mutex6es.c b/tests/mutex6es.c
index f34b691..d4b6249 100644
--- a/tests/mutex6es.c
+++ b/tests/mutex6es.c
@@ -79,7 +79,7 @@ main()
assert(pthread_create(&t, NULL, locker, NULL) == 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert((int)(size_t)result == 555);
assert(lockCount == 2);
diff --git a/tests/mutex6r.c b/tests/mutex6r.c
index 85bb6bd..552f394 100644
--- a/tests/mutex6r.c
+++ b/tests/mutex6r.c
@@ -85,7 +85,7 @@ main()
assert(pthread_create(&t, NULL, locker, NULL) == 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert((int)(size_t)result == 555);
assert(lockCount == 2);
diff --git a/tests/mutex6rs.c b/tests/mutex6rs.c
index 6c8c1f5..4242fd6 100644
--- a/tests/mutex6rs.c
+++ b/tests/mutex6rs.c
@@ -78,7 +78,7 @@ main()
assert(pthread_create(&t, NULL, locker, NULL) == 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert((int)(size_t)result == 555);
assert(lockCount == 2);
diff --git a/tests/mutex7e.c b/tests/mutex7e.c
index 52424be..82d941f 100644
--- a/tests/mutex7e.c
+++ b/tests/mutex7e.c
@@ -86,7 +86,7 @@ main()
assert(pthread_create(&t, NULL, locker, NULL) == 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert((int)(size_t)result == 555);
assert(lockCount == 2);
diff --git a/tests/mutex7r.c b/tests/mutex7r.c
index 1ce1aa6..2c1699b 100644
--- a/tests/mutex7r.c
+++ b/tests/mutex7r.c
@@ -85,7 +85,7 @@ main()
assert(pthread_create(&t, NULL, locker, NULL) == 0);
- assert(pthread_join(t, (void *) &result) == 0);
+ assert(pthread_join(t, &result) == 0);
assert((int)(size_t)result == 555);
assert(lockCount == 2);
diff --git a/tests/rwlock6.c b/tests/rwlock6.c
index 8861823..0ac6b27 100644
--- a/tests/rwlock6.c
+++ b/tests/rwlock6.c
@@ -89,9 +89,9 @@ main()
Sleep(500);
assert(pthread_create(&wrt2, NULL, wrfunc, NULL) == 0);
- assert(pthread_join(wrt1, (void *) &wr1Result) == 0);
- assert(pthread_join(rdt, (void *) &rdResult) == 0);
- assert(pthread_join(wrt2, (void *) &wr2Result) == 0);
+ assert(pthread_join(wrt1, &wr1Result) == 0);
+ assert(pthread_join(rdt, &rdResult) == 0);
+ assert(pthread_join(wrt2, &wr2Result) == 0);
assert((int)(size_t)wr1Result == 10);
assert((int)(size_t)rdResult == 10);
diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c
index 4af85d9..6c45b0a 100644
--- a/tests/rwlock6_t.c
+++ b/tests/rwlock6_t.c
@@ -114,10 +114,10 @@ main()
Sleep(500);
assert(pthread_create(&rdt2, NULL, rdfunc, (void *)(size_t)2) == 0);
- assert(pthread_join(wrt1, (void *) &wr1Result) == 0);
- assert(pthread_join(rdt1, (void *) &rd1Result) == 0);
- assert(pthread_join(wrt2, (void *) &wr2Result) == 0);
- assert(pthread_join(rdt2, (void *) &rd2Result) == 0);
+ assert(pthread_join(wrt1, &wr1Result) == 0);
+ assert(pthread_join(rdt1, &rd1Result) == 0);
+ assert(pthread_join(wrt2, &wr2Result) == 0);
+ assert(pthread_join(rdt2, &rd2Result) == 0);
assert((int)(size_t)wr1Result == 10);
assert((int)(size_t)rd1Result == 0);
diff --git a/tests/semaphore1.c b/tests/semaphore1.c
index de349c7..0f2eb77 100644
--- a/tests/semaphore1.c
+++ b/tests/semaphore1.c
@@ -110,7 +110,7 @@ thr(void * arg)
assert(sem_post(&s) == 0);
- return 0;
+ return NULL;
}
@@ -123,7 +123,7 @@ main()
int result2;
assert(pthread_create(&t, NULL, thr, NULL) == 0);
- assert(pthread_join(t, (void *)&result1) == 0);
+ assert(pthread_join(t, &result1) == 0);
assert((int)(size_t)result1 == 0);
assert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0);
diff --git a/tests/semaphore4.c b/tests/semaphore4.c
index 0ccd45a..3a28c7b 100644
--- a/tests/semaphore4.c
+++ b/tests/semaphore4.c
@@ -111,7 +111,7 @@ main()
assert(pthread_cancel(t[50]) == 0);
{
void* result;
- assert(pthread_join(t[50], (void *) &result) == 0);
+ assert(pthread_join(t[50], &result) == 0);
}
assert(sem_getvalue(&s, &value) == 0);
assert(-value == (MAX_COUNT - 1));