aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Duda <deo@logos-m.ru>2001-11-17 21:15:47 +0000
committerEgor Duda <deo@logos-m.ru>2001-11-17 21:15:47 +0000
commit62a602939b68730b618edaec7e3e5d004eec2084 (patch)
treeec5803889794d1b601f85c7db2253bec5e6b9793
parent9c6a5c6ea84b1ac29aa6115264d46ed9621c8317 (diff)
downloadnewlib-62a602939b68730b618edaec7e3e5d004eec2084.zip
newlib-62a602939b68730b618edaec7e3e5d004eec2084.tar.gz
newlib-62a602939b68730b618edaec7e3e5d004eec2084.tar.bz2
* winsup.api/pthread/condvar3_1.c: Fix debugging output.
-rw-r--r--winsup/testsuite/ChangeLog4
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar3_1.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index b1bdf5e..dcc9f0a 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-11-18 Egor Duda <deo@logos-m.ru>
+
+ * winsup.api/pthread/condvar3_1.c: Fix debugging output.
+
2001-11-15 Egor Duda <deo@logos-m.ru>
* winsup.api/pthread/: New directory. Ports of pthread functionality
diff --git a/winsup/testsuite/winsup.api/pthread/condvar3_1.c b/winsup/testsuite/winsup.api/pthread/condvar3_1.c
index 06f8bf7..b08b048 100644
--- a/winsup/testsuite/winsup.api/pthread/condvar3_1.c
+++ b/winsup/testsuite/winsup.api/pthread/condvar3_1.c
@@ -72,12 +72,10 @@ mythread(void * arg)
result = pthread_cond_timedwait(&cv, &mutex, &abstime);
if (result == ETIMEDOUT)
{
- printf ("thread N %d has timed out\n", (int)arg);
timedout++;
}
else
{
- printf ("thread N %d has waken up\n", (int)arg);
awoken++;
}
@@ -123,7 +121,6 @@ main()
for (i = NUMTHREADS/3; i <= 2*NUMTHREADS/3; i++)
{
- printf ("sending signal N %d\n", signaled + 1);
assert(pthread_cond_signal(&cv) == 0);
signaled++;
}
@@ -134,9 +131,9 @@ main()
assert(result == i);
}
- fprintf(stderr, "awk = %d\n", awoken);
- fprintf(stderr, "sig = %d\n", signaled);
- fprintf(stderr, "tot = %d\n", timedout);
+ printf("awk = %d\n", awoken);
+ printf("sig = %d\n", signaled);
+ printf("tot = %d\n", timedout);
assert(signaled == awoken);
assert(timedout == NUMTHREADS - signaled);