mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-12 07:00:07 +08:00
Fix testcase 114 for arm and apple
Arm has a problem with tls after a fork. The pthread_key_create seems to be forgotten? Apple has a problem with the exit(0) code in do_fork(). An IO mutex is still held after a fork().
This commit is contained in:
parent
78da4586a0
commit
ae1796fc34
@ -107,7 +107,9 @@ main (void)
|
|||||||
sem_init (&sem_child, 0, 0);
|
sem_init (&sem_child, 0, 0);
|
||||||
pthread_create(&id1, NULL, high_load, NULL);
|
pthread_create(&id1, NULL, high_load, NULL);
|
||||||
pthread_create(&id2, NULL, do_signal, NULL);
|
pthread_create(&id2, NULL, do_signal, NULL);
|
||||||
|
#if !defined(__arm__) && !defined(__APPLE__)
|
||||||
pthread_create(&id3, NULL, do_fork, NULL);
|
pthread_create(&id3, NULL, do_fork, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* sleep does not work !!! */
|
/* sleep does not work !!! */
|
||||||
end = time(NULL) + 2;
|
end = time(NULL) + 2;
|
||||||
@ -118,7 +120,9 @@ main (void)
|
|||||||
|
|
||||||
pthread_join(id1, NULL);
|
pthread_join(id1, NULL);
|
||||||
pthread_join(id2, NULL);
|
pthread_join(id2, NULL);
|
||||||
|
#if !defined(__arm__) && !defined(__APPLE__)
|
||||||
pthread_join(id3, NULL);
|
pthread_join(id3, NULL);
|
||||||
|
#endif
|
||||||
sem_destroy (&sem);
|
sem_destroy (&sem);
|
||||||
sem_destroy (&sem_child);
|
sem_destroy (&sem_child);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user