summaryrefslogtreecommitdiff
path: root/tests/exit2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exit2.c')
-rw-r--r--tests/exit2.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/tests/exit2.c b/tests/exit2.c
index af906eb..48ad5d0 100644
--- a/tests/exit2.c
+++ b/tests/exit2.c
@@ -1,35 +1,12 @@
/*
* Test for pthread_exit().
- *
- * Depends on API functions: pthread_create().
*/
#include <pthread.h>
-#include <stdio.h>
-
-void *
-func(void * arg)
-{
- printf("Hello world\n");
- pthread_exit(arg);
-
- /* Never reached. */
- return 0;
-}
int
main(int argc, char * argv[])
{
- pthread_t id[4];
- int i;
-
- /* Create a few threads, make them say hello and then exit. */
-
- for (i = 0; i < 4; i++)
- {
- pthread_create(&id[i], NULL, func, (void *) i);
- }
-
- /* Semantics should be the same as POSIX. Wait for the workers. */
- pthread_exit((void *) 0);
+ /* Should be the same as return 0; */
+ pthread_exit(0);
}