Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
threads.h95 linesDownload Raw Back to libxml
1/**2 * Summary: interfaces for thread handling3 * Description: set of generic threading related routines4 *              should work with pthreads, Windows native or TLS threads5 *6 * Copy: See Copyright for the status of this software.7 *8 * Author: Daniel Veillard9 */10 11#ifndef __XML_THREADS_H__12#define __XML_THREADS_H__13 14#include <libxml/xmlversion.h>15 16#ifdef __cplusplus17extern "C" {18#endif19 20/*21 * xmlMutex are a simple mutual exception locks.22 */23typedef struct _xmlMutex xmlMutex;24typedef xmlMutex *xmlMutexPtr;25 26/*27 * xmlRMutex are reentrant mutual exception locks.28 */29typedef struct _xmlRMutex xmlRMutex;30typedef xmlRMutex *xmlRMutexPtr;31 32#ifdef __cplusplus33}34#endif35#include <libxml/globals.h>36#ifdef __cplusplus37extern "C" {38#endif39XMLPUBFUN xmlMutexPtr40			xmlNewMutex	(void);41XMLPUBFUN void42			xmlMutexLock	(xmlMutexPtr tok);43XMLPUBFUN void44			xmlMutexUnlock	(xmlMutexPtr tok);45XMLPUBFUN void46			xmlFreeMutex	(xmlMutexPtr tok);47 48XMLPUBFUN xmlRMutexPtr49			xmlNewRMutex	(void);50XMLPUBFUN void51			xmlRMutexLock	(xmlRMutexPtr tok);52XMLPUBFUN void53			xmlRMutexUnlock	(xmlRMutexPtr tok);54XMLPUBFUN void55			xmlFreeRMutex	(xmlRMutexPtr tok);56 57/*58 * Library wide APIs.59 */60XML_DEPRECATED61XMLPUBFUN void62			xmlInitThreads	(void);63XMLPUBFUN void64			xmlLockLibrary	(void);65XMLPUBFUN void66			xmlUnlockLibrary(void);67XML_DEPRECATED68XMLPUBFUN int69			xmlGetThreadId	(void);70XML_DEPRECATED71XMLPUBFUN int72			xmlIsMainThread	(void);73XML_DEPRECATED74XMLPUBFUN void75			xmlCleanupThreads(void);76XML_DEPRECATED77XMLPUBFUN xmlGlobalStatePtr78			xmlGetGlobalState(void);79 80/** DOC_DISABLE */81#if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \82    !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)83int84xmlDllMain(void *hinstDLL, unsigned long fdwReason,85           void *lpvReserved);86#endif87/** DOC_ENABLE */88 89#ifdef __cplusplus90}91#endif92 93 94#endif /* __XML_THREADS_H__ */95 
codekingpro/portable-devtools · Team Ai