summaryrefslogtreecommitdiff
path: root/tests/exit4.c
diff options
context:
space:
mode:
authorrpj <rpj>2002-02-18 03:16:52 +0000
committerrpj <rpj>2002-02-18 03:16:52 +0000
commita416ab17ecf9f2cb0f1e3f7bd645a8d1ce690ca2 (patch)
tree72f776cd64e48824a5578ff7a523bc69097143b4 /tests/exit4.c
parente6f1797e9e9925ae7f9dda54806ef8f52ae3ed07 (diff)
Major reorganisation of source code; new routine and tests added.
Diffstat (limited to 'tests/exit4.c')
-rw-r--r--tests/exit4.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/exit4.c b/tests/exit4.c
index 3c0c8b1..480fc2e 100644
--- a/tests/exit4.c
+++ b/tests/exit4.c
@@ -64,21 +64,29 @@ void *
func(void * arg)
{
Guard g("func", counter);
+
#ifdef USE_PTHREAD_EXIT
+
pthread_exit(arg);
assert(0); //Never reached with pthread_exit
+
#endif //USE_PTHREAD_EXIT
+
return ret_value;
}
#endif /*__CLEANUP_CXX */
-int main(int, char **)
+int
+main()
{
#ifndef __CLEANUP_CXX
+
printf("Test requires C++ cleanup enabled. Skipped.\n");
+
#else
+
{
void *ret = 0;
Guard g("main", counter);
@@ -87,7 +95,10 @@ int main(int, char **)
assert(0 == pthread_join(id, &ret));
assert(ret == ret_value);
}
+
assert(counter == init_counter_value);
+
#endif /*__CLEANUP_CXX */
+
return 0;
}