| OLD | NEW |
| 1 /** | 1 /** |
| 2 * threads.c: set of generic threading related routines | 2 * threads.c: set of generic threading related routines |
| 3 * | 3 * |
| 4 * See Copyright for the status of this software. | 4 * See Copyright for the status of this software. |
| 5 * | 5 * |
| 6 * Gary Pennington <Gary.Pennington@uk.sun.com> | 6 * Gary Pennington <Gary.Pennington@uk.sun.com> |
| 7 * daniel@veillard.com | 7 * daniel@veillard.com |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 #define IN_LIBXML | 10 #define IN_LIBXML |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 #if defined(SOLARIS) | 41 #if defined(SOLARIS) |
| 42 #include <note.h> | 42 #include <note.h> |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 /* #define DEBUG_THREADS */ | 45 /* #define DEBUG_THREADS */ |
| 46 | 46 |
| 47 #ifdef HAVE_PTHREAD_H | 47 #ifdef HAVE_PTHREAD_H |
| 48 | 48 |
| 49 static int libxml_is_threaded = -1; | 49 static int libxml_is_threaded = -1; |
| 50 #ifdef __GNUC__ | 50 |
| 51 #ifdef linux | |
| 52 #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) | |
| 53 extern int pthread_once (pthread_once_t *__once_control, | |
| 54 void (*__init_routine) (void)) | |
| 55 » __attribute((weak)); | |
| 56 extern void *pthread_getspecific (pthread_key_t __key) | |
| 57 » __attribute((weak)); | |
| 58 extern int pthread_setspecific (pthread_key_t __key, | |
| 59 __const void *__pointer) | |
| 60 » __attribute((weak)); | |
| 61 extern int pthread_key_create (pthread_key_t *__key, | |
| 62 void (*__destr_function) (void *)) | |
| 63 » __attribute((weak)); | |
| 64 extern int pthread_key_delete (pthread_key_t __key) | |
| 65 » __attribute((weak)); | |
| 66 extern int pthread_mutex_init () | |
| 67 » __attribute((weak)); | |
| 68 extern int pthread_mutex_destroy () | |
| 69 » __attribute((weak)); | |
| 70 extern int pthread_mutex_lock () | |
| 71 » __attribute((weak)); | |
| 72 extern int pthread_mutex_unlock () | |
| 73 » __attribute((weak)); | |
| 74 extern int pthread_cond_init () | |
| 75 » __attribute((weak)); | |
| 76 extern int pthread_cond_destroy () | |
| 77 » __attribute((weak)); | |
| 78 extern int pthread_cond_wait () | |
| 79 » __attribute((weak)); | |
| 80 extern int pthread_equal () | |
| 81 » __attribute((weak)); | |
| 82 extern pthread_t pthread_self () | |
| 83 » __attribute((weak)); | |
| 84 extern int pthread_key_create () | |
| 85 » __attribute((weak)); | |
| 86 extern int pthread_key_delete () | |
| 87 » __attribute((weak)); | |
| 88 extern int pthread_cond_signal () | |
| 89 » __attribute((weak)); | |
| 90 #endif | |
| 91 #endif /* linux */ | |
| 92 #endif /* __GNUC__ */ | |
| 93 #endif /* HAVE_PTHREAD_H */ | 51 #endif /* HAVE_PTHREAD_H */ |
| 94 | 52 |
| 95 /* | 53 /* |
| 96 * TODO: this module still uses malloc/free and not xmlMalloc/xmlFree | 54 * TODO: this module still uses malloc/free and not xmlMalloc/xmlFree |
| 97 * to avoid some crazyness since xmlMalloc/xmlFree may actually | 55 * to avoid some crazyness since xmlMalloc/xmlFree may actually |
| 98 * be hosted on allocated blocks needing them for the allocation ... | 56 * be hosted on allocated blocks needing them for the allocation ... |
| 99 */ | 57 */ |
| 100 | 58 |
| 101 /* | 59 /* |
| 102 * xmlMutex are a simple mutual exception locks | 60 * xmlMutex are a simple mutual exception locks |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 free(p); | 981 free(p); |
| 1024 } | 982 } |
| 1025 } | 983 } |
| 1026 break; | 984 break; |
| 1027 } | 985 } |
| 1028 return TRUE; | 986 return TRUE; |
| 1029 } | 987 } |
| 1030 #endif | 988 #endif |
| 1031 #define bottom_threads | 989 #define bottom_threads |
| 1032 #include "elfgcchack.h" | 990 #include "elfgcchack.h" |
| OLD | NEW |