mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-31 02:43:06 +03:00
Portability fix for testThreads.c
Similar to the one in libxml2, don't assume threads id are scalars
This commit is contained in:
@ -198,10 +198,8 @@ main(void)
|
|||||||
*/
|
*/
|
||||||
printf("Pass 1\n");
|
printf("Pass 1\n");
|
||||||
for (repeat = 0;repeat < 500;repeat++) {
|
for (repeat = 0;repeat < 500;repeat++) {
|
||||||
for (i = 0; i < num_threads; i++) {
|
memset(results, 0, sizeof(*results)*num_threads);
|
||||||
results[i] = NULL;
|
memset(tid, 0xff, sizeof(*tid)*num_threads);
|
||||||
tid[i] = (pthread_t) -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < num_threads; i++) {
|
for (i = 0; i < num_threads; i++) {
|
||||||
ret = pthread_create(&tid[i], NULL, threadRoutine1,
|
ret = pthread_create(&tid[i], NULL, threadRoutine1,
|
||||||
@ -240,10 +238,8 @@ main(void)
|
|||||||
fprintf(stderr, "Main failed to compile stylesheet\n");
|
fprintf(stderr, "Main failed to compile stylesheet\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
for (i = 0; i < num_threads; i++) {
|
memset(results, 0, sizeof(*results)*num_threads);
|
||||||
results[i] = NULL;
|
memset(tid, 0xff, sizeof(*tid)*num_threads);
|
||||||
tid[i] = (pthread_t) -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < num_threads; i++) {
|
for (i = 0; i < num_threads; i++) {
|
||||||
ret = pthread_create(&tid[i], NULL, threadRoutine2, (void *) cur);
|
ret = pthread_create(&tid[i], NULL, threadRoutine2, (void *) cur);
|
||||||
|
Reference in New Issue
Block a user