summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pthread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pthread.c b/pthread.c
index 0fa8467..12533fa 100644
--- a/pthread.c
+++ b/pthread.c
@@ -62,7 +62,6 @@ static void cleanup4a2(void *arg)
static void cleanup4a3(void *arg)
{
*(int *)arg += 3;
- pthread_exit(0);
}
static void cleanup4a4(void *arg)
@@ -169,7 +168,7 @@ int test_pthread(void)
TEST(r, pthread_create(&td, 0, start4a, foo), 0, "failed to create thread");
TEST(r, pthread_cancel(td), 0, "cancelling");
TEST(r, pthread_join(td, &res), 0, "joining canceled thread");
- TEST(res, res, 0, "canceled thread exit status");
+ TEST(res, res, PTHREAD_CANCELED, "canceled thread exit status");
TEST(r, foo[0], 1, "cleanup handler failed to run");
TEST(r, foo[1], 2, "cleanup handler failed to run");
TEST(r, foo[2], 3, "cleanup handler failed to run");