tests/pthread_cleanup: small improvements
This commit is contained in:
parent
1e8104f268
commit
7bab0339dc
@ -60,7 +60,7 @@ static void *run(void *unused) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
puts("Start.");
|
puts("START");
|
||||||
|
|
||||||
pthread_t th_id;
|
pthread_t th_id;
|
||||||
pthread_create(&th_id, NULL, run, NULL);
|
pthread_create(&th_id, NULL, run, NULL);
|
||||||
@ -69,6 +69,12 @@ int main(void) {
|
|||||||
pthread_join(th_id, (void **) &res);
|
pthread_join(th_id, (void **) &res);
|
||||||
|
|
||||||
printf("Result: %i\n", (int) (intptr_t) res);
|
printf("Result: %i\n", (int) (intptr_t) res);
|
||||||
puts("Done.");
|
|
||||||
|
if (res == RET_EXIT) {
|
||||||
|
puts("SUCCESS");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
puts("FAILURE");
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user