summaryrefslogtreecommitdiff
path: root/lib/libc_r/TEST/test_sleep.c
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-01-10 22:57:12 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-01-10 22:57:12 +0000
commitdef0d6c22617b70f7bbe487bbd31c9e3a66c48c8 (patch)
treee48e5a13d08fc9b1ed5b03a337ca614f0ca6b1d4 /lib/libc_r/TEST/test_sleep.c
parent1eab4be7f1cb7dcddac7544d81551ae75fcb70f8 (diff)
nice-ify
Diffstat (limited to 'lib/libc_r/TEST/test_sleep.c')
-rw-r--r--lib/libc_r/TEST/test_sleep.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/libc_r/TEST/test_sleep.c b/lib/libc_r/TEST/test_sleep.c
index 47b476219f7..784a203f741 100644
--- a/lib/libc_r/TEST/test_sleep.c
+++ b/lib/libc_r/TEST/test_sleep.c
@@ -10,6 +10,7 @@
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
+#include "test.h"
const char buf[] = "abcdefghijklimnopqrstuvwxyz";
int fd = 1;
@@ -36,14 +37,12 @@ main()
sleep(3);
printf("Done sleeping\n");
- for(i = 0; i < count; i++) {
- if (pthread_create(&thread[i], NULL, new_thread, (void *) i)) {
- printf("error creating new thread %ld\n", i);
- }
- }
+ for(i = 0; i < count; i++)
+ CHECKr(pthread_create(&thread[i], NULL, new_thread,
+ (void *) i));
for (i = 0; i < count; i++)
- pthread_join(thread[i], NULL);
+ CHECKr(pthread_join(thread[i], NULL));
- return(0);
+ SUCCEED;
}