ReactOS 0.4.16-dev-2132-g3885311
threads.h File Reference
#include <libxml/threads.h>
Include dependency graph for threads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _xmlMutex
 

Functions

XML_HIDDEN void xmlInitMutex (xmlMutexPtr mutex)
 
XML_HIDDEN void xmlCleanupMutex (xmlMutexPtr mutex)
 

Function Documentation

◆ xmlCleanupMutex()

XML_HIDDEN void xmlCleanupMutex ( xmlMutexPtr  mutex)

xmlCleanupMutex: @mutex: the simple mutex

Reclaim resources associated with a mutex.

Definition at line 166 of file threads.c.

167{
168#ifdef HAVE_POSIX_THREADS
169 if (XML_IS_NEVER_THREADED() == 0)
170 pthread_mutex_destroy(&mutex->lock);
171#elif defined HAVE_WIN32_THREADS
173#else
174 (void) mutex;
175#endif
176}
Definition: module.h:456
FAST_MUTEX lock
Definition: module.h:457
#define XML_IS_NEVER_THREADED()
Definition: threads.c:92
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by xmlCleanupDictInternal(), xmlCleanupGlobalsInternal(), xmlCleanupMemoryInternal(), xmlCleanupRandom(), and xmlFreeMutex().

◆ xmlInitMutex()

XML_HIDDEN void xmlInitMutex ( xmlMutexPtr  mutex)

xmlInitMutex: @mutex: the mutex

Initialize a mutex.

Definition at line 128 of file threads.c.

129{
130#ifdef HAVE_POSIX_THREADS
131 if (XML_IS_NEVER_THREADED() == 0)
132 pthread_mutex_init(&mutex->lock, NULL);
133#elif defined HAVE_WIN32_THREADS
135#else
136 (void) mutex;
137#endif
138}
#define NULL
Definition: types.h:112
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751

Referenced by xmlInitDictInternal(), xmlInitGlobalsInternal(), xmlInitMemoryInternal(), xmlInitRandom(), and xmlNewMutex().