]>
git.saurik.com Git - apple/libpthread.git/blob - tests/pthread_cancel.c
3 #include <darwintest.h>
6 run(void * __unused arg
)
14 T_DECL(pthread_cancel
, "pthread_cancel",
15 T_META_ALL_VALID_ARCHS(YES
))
18 void *join_result
= NULL
;
19 T_ASSERT_POSIX_ZERO(pthread_create(&thread
, NULL
, run
, NULL
), NULL
);
20 T_ASSERT_POSIX_ZERO(pthread_cancel(thread
), NULL
);
21 T_ASSERT_POSIX_ZERO(pthread_join(thread
, &join_result
), NULL
);
22 T_ASSERT_EQ(join_result
, PTHREAD_CANCELED
, NULL
);