* xmlInitMutex: * @mutex: the mutex * * Initialize a mutex. */
| 126 | * Initialize a mutex. |
| 127 | */ |
| 128 | void |
| 129 | xmlInitMutex(xmlMutexPtr mutex) |
| 130 | { |
| 131 | #ifdef HAVE_POSIX_THREADS |
| 132 | if (XML_IS_NEVER_THREADED() == 0) |
| 133 | pthread_mutex_init(&mutex->lock, NULL); |
| 134 | #elif defined HAVE_WIN32_THREADS |
| 135 | InitializeCriticalSection(&mutex->cs); |
| 136 | #else |
| 137 | (void) mutex; |
| 138 | #endif |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * xmlNewMutex: |
no outgoing calls
no test coverage detected