Permalink
Browse files

599241 fix an initialization problem on Win64

as the thread_t is not an integral datatype on that platform
  • Loading branch information...
1 parent 0cbeb50 commit d794a84a9e147498069b4c582d57b899bf068187 @awn awn committed with veillard Nov 15, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −4 testThreads.c
View
@@ -105,10 +105,8 @@ main(void)
for (repeat = 0;repeat < 500;repeat++) {
xmlLoadCatalog(catalog);
- for (i = 0; i < num_threads; i++) {
- results[i] = NULL;
- tid[i] = (pthread_t) -1;
- }
+ memset(results, 0, sizeof(*results)*num_threads);
+ memset(tid, 0xff, sizeof(*tid)*num_threads);
for (i = 0; i < num_threads; i++) {
ret = pthread_create(&tid[i], NULL, thread_specific_data,

0 comments on commit d794a84

Please sign in to comment.