Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: third_party/libxml/src/testThreads.c

Issue 1193533007: Upgrade to libxml 2.9.2 and libxslt 1.1.28 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no iconv Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxml/src/testSchemas.c ('k') | third_party/libxml/src/testThreadsWin32.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "libxml.h" 1 #include "libxml.h"
2 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 #include <stdio.h> 4 #include <stdio.h>
5 5
6 #if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined (LIBXML_SAX1_ENABLED) 6 #if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined (LIBXML_SAX1_ENABLED)
7 #include <libxml/globals.h> 7 #include <libxml/globals.h>
8 #include <libxml/threads.h> 8 #include <libxml/threads.h>
9 #include <libxml/parser.h> 9 #include <libxml/parser.h>
10 #include <libxml/catalog.h> 10 #include <libxml/catalog.h>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 { 98 {
99 unsigned int i, repeat; 99 unsigned int i, repeat;
100 unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]); 100 unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
101 void *results[MAX_ARGC]; 101 void *results[MAX_ARGC];
102 int ret; 102 int ret;
103 103
104 xmlInitParser(); 104 xmlInitParser();
105 for (repeat = 0;repeat < 500;repeat++) { 105 for (repeat = 0;repeat < 500;repeat++) {
106 xmlLoadCatalog(catalog); 106 xmlLoadCatalog(catalog);
107 107
108 » for (i = 0; i < num_threads; i++) { 108 memset(results, 0, sizeof(*results)*num_threads);
109 » results[i] = NULL; 109 memset(tid, 0xff, sizeof(*tid)*num_threads);
110 » tid[i] = (pthread_t) -1;
111 » }
112 110
113 for (i = 0; i < num_threads; i++) { 111 for (i = 0; i < num_threads; i++) {
114 ret = pthread_create(&tid[i], NULL, thread_specific_data, 112 ret = pthread_create(&tid[i], NULL, thread_specific_data,
115 (void *) testfiles[i]); 113 (void *) testfiles[i]);
116 if (ret != 0) { 114 if (ret != 0) {
117 perror("pthread_create"); 115 perror("pthread_create");
118 exit(1); 116 exit(1);
119 } 117 }
120 } 118 }
121 for (i = 0; i < num_threads; i++) { 119 for (i = 0; i < num_threads; i++) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 #endif /* pthreads or BeOS threads */ 191 #endif /* pthreads or BeOS threads */
194 192
195 #else /* !LIBXML_THREADS_ENABLED */ 193 #else /* !LIBXML_THREADS_ENABLED */
196 int 194 int
197 main(void) 195 main(void)
198 { 196 {
199 fprintf(stderr, "libxml was not compiled with thread or catalog support\n"); 197 fprintf(stderr, "libxml was not compiled with thread or catalog support\n");
200 return (0); 198 return (0);
201 } 199 }
202 #endif 200 #endif
OLDNEW
« no previous file with comments | « third_party/libxml/src/testSchemas.c ('k') | third_party/libxml/src/testThreadsWin32.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698