1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-18 14:21:02 +03:00
Files
libxml2/include/libxml/threads.h
Daniel Veillard b847864fc2 started integrating the core of the thread support not activated yet but
* Makefile.am include/libxml/Makefile.am
  include/libxml/globals.h globals.c  include/libxml/threads.h
  threads.c build_glob.py global.data xmlcatalog.c acconfig.h
  configure.in: started integrating the core of the thread support
  not activated yet but half integrated. The code should still
  compile and work anyway.
Daniel
2001-10-12 17:29:10 +00:00

55 lines
1.1 KiB
C

/**
* threads.c: set of generic threading related routines
*
* See Copyright for the status of this software.
*
* daniel@veillard.com
*/
#ifndef __XML_THREADS_H__
#define __XML_THREADS_H__
#include <libxml/globals.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* xmlMutex are a simple mutual exception locks
*/
typedef struct _xmlMutex xmlMutex;
typedef xmlMutex *xmlMutexPtr;
xmlMutexPtr xmlNewMutex (void);
void xmlMutexLock (xmlMutexPtr tok);
void xmlMutexUnlock (xmlMutexPtr tok);
void xmlFreeMutex (xmlMutexPtr tok);
/*
* xmlRMutex are reentrant mutual exception locks
*/
typedef struct _xmlRMutex xmlRMutex;
typedef xmlRMutex *xmlRMutexPtr;
xmlRMutexPtr xmlNewRMutex (void);
void xmlRMutexLock (xmlRMutexPtr tok);
void xmlRMutexUnlock (xmlRMutexPtr tok);
void xmlFreeRMutex (xmlRMutexPtr tok);
/*
* Library wide APIs
*/
void xmlInitThreads (void);
void xmlLockLibrary (void);
void xmlUnlockLibrary(void);
void xmlCleanupThreads(void);
xmlGlobalStatePtr xmlGetGlobalState(void);
#ifdef __cplusplus
}
#endif
#endif /* __XML_THREADS_H__ */