1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-17 02:02:39 +03:00
Files
libxml2/doc/html/libxml-threads.html
Daniel Veillard 2fdbd32d51 new dictionary module to keep a single instance of the names used by the
* dict.c include/libxml/dict.h Makefile.am include/libxml/Makefile.am:
  new dictionary module to keep a single instance of the names used
  by the parser
* DOCBparser.c HTMLparser.c parser.c parserInternals.c valid.c:
  switched all parsers to use the dictionary internally
* include/libxml/HTMLparser.h include/libxml/parser.h
  include/libxml/parserInternals.h include/libxml/valid.h:
  Some of the interfaces changed as a result to receive or return
  "const xmlChar *" instead of "xmlChar *", this is either
  insignificant from an user point of view or when the returning
  value changed, those function are really parser internal methods
  that no user code should really change
* doc/libxml2-api.xml doc/html/*: the API interface changed and
  the docs were regenerated
Daniel
2003-08-18 12:15:38 +00:00

133 lines
14 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>threads</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
.synopsis, .classsynopsis {
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting {
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist {
padding: 4px;
margin-left: 3em;
}
.navigation {
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a {
color: #770000;
}
.navigation a:visited {
color: #550000;
}
.navigation .title {
font-size: 200%;
}
</style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-c14n.html" title="c14n"><link rel="next" href="libxml-globals.html" title="globals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-c14n.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-globals.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-threads"></a><div class="titlepage"></div><div class="refnamediv"><h2>threads</h2><p>threads &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
struct <a href="libxml-threads.html#xmlMutex">xmlMutex</a>;
typedef <a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a>;
struct <a href="libxml-threads.html#xmlRMutex">xmlRMutex</a>;
typedef <a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a>;
<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> <a href="libxml-threads.html#xmlNewMutex">xmlNewMutex</a> (void);
void <a href="libxml-threads.html#xmlMutexLock">xmlMutexLock</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);
void <a href="libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);
void <a href="libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);
<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> <a href="libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a> (void);
void <a href="libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a> (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);
void <a href="libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a> (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);
void <a href="libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a> (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);
void <a href="libxml-threads.html#xmlInitThreads">xmlInitThreads</a> (void);
void <a href="libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a> (void);
void <a href="libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a> (void);
int <a href="libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a> (void);
int <a href="libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a> (void);
void <a href="libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a> (void);
<a href="libxml-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> <a href="libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a> (void);
</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlMutex"></a>struct xmlMutex</h3><pre class="programlisting">struct xmlMutex;</pre><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMutexPtr"></a>xmlMutexPtr</h3><pre class="programlisting">typedef xmlMutex *xmlMutexPtr;
</pre><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRMutex"></a>struct xmlRMutex</h3><pre class="programlisting">struct xmlRMutex;</pre><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRMutexPtr"></a>xmlRMutexPtr</h3><pre class="programlisting">typedef xmlRMutex *xmlRMutexPtr;
</pre><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNewMutex"></a>xmlNewMutex ()</h3><pre class="programlisting"><a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> xmlNewMutex (void);</pre><p>
<a href="libxml-threads.html#xmlNewMutex">xmlNewMutex</a>() is used to allocate a libxml2 token struct for use in
synchronizing access to data.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new simple mutex pointer or NULL in case of error
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMutexLock"></a>xmlMutexLock ()</h3><pre class="programlisting">void xmlMutexLock (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);</pre><p>
<a href="libxml-threads.html#xmlMutexLock">xmlMutexLock</a>() is used to lock a libxml2 token.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>tok</tt></i> :</span></td><td> the simple mutex
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMutexUnlock"></a>xmlMutexUnlock ()</h3><pre class="programlisting">void xmlMutexUnlock (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);</pre><p>
<a href="libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a>() is used to unlock a libxml2 token.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>tok</tt></i> :</span></td><td> the simple mutex
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeMutex"></a>xmlFreeMutex ()</h3><pre class="programlisting">void xmlFreeMutex (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);</pre><p>
<a href="libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a>() is used to reclaim resources associated with a libxml2 token
struct.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>tok</tt></i> :</span></td><td> the simple mutex
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNewRMutex"></a>xmlNewRMutex ()</h3><pre class="programlisting"><a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> xmlNewRMutex (void);</pre><p>
<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="xmlRNewMutex">xmlRNewMutex</GTKDOCLINK>() is used to allocate a reentrant mutex for use in
synchronizing access to data. token_r is a re-entrant lock and thus useful
for synchronizing access to data structures that may be manipulated in a
recursive fashion.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new reentrant mutex pointer or NULL in case of error
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRMutexLock"></a>xmlRMutexLock ()</h3><pre class="programlisting">void xmlRMutexLock (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);</pre><p>
<a href="libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a>() is used to lock a libxml2 token_r.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>tok</tt></i> :</span></td><td> the reentrant mutex
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRMutexUnlock"></a>xmlRMutexUnlock ()</h3><pre class="programlisting">void xmlRMutexUnlock (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);</pre><p>
<a href="libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a>() is used to unlock a libxml2 token_r.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>tok</tt></i> :</span></td><td> the reentrant mutex
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeRMutex"></a>xmlFreeRMutex ()</h3><pre class="programlisting">void xmlFreeRMutex (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);</pre><p>
<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="xmlRFreeMutex">xmlRFreeMutex</GTKDOCLINK>() is used to reclaim resources associated with a
reentrant mutex.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>tok</tt></i> :</span></td><td> the reentrant mutex
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInitThreads"></a>xmlInitThreads ()</h3><pre class="programlisting">void xmlInitThreads (void);</pre><p>
<a href="libxml-threads.html#xmlInitThreads">xmlInitThreads</a>() is used to to initialize all the thread related
data of the libxml2 library.</p><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlLockLibrary"></a>xmlLockLibrary ()</h3><pre class="programlisting">void xmlLockLibrary (void);</pre><p>
<a href="libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a>() is used to take out a re-entrant lock on the libxml2
library.</p><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlUnlockLibrary"></a>xmlUnlockLibrary ()</h3><pre class="programlisting">void xmlUnlockLibrary (void);</pre><p>
<a href="libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a>() is used to release a re-entrant lock on the libxml2
library.</p><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetThreadId"></a>xmlGetThreadId ()</h3><pre class="programlisting">int xmlGetThreadId (void);</pre><p>
<a href="libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a>() find the current thread ID number</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the current thread ID number
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIsMainThread"></a>xmlIsMainThread ()</h3><pre class="programlisting">int xmlIsMainThread (void);</pre><p>
<a href="libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a>() check whether the current thread is the main thread.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if the current thread is the main thread, 0 otherwise
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCleanupThreads"></a>xmlCleanupThreads ()</h3><pre class="programlisting">void xmlCleanupThreads (void);</pre><p>
<a href="libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a>() is used to to cleanup all the thread related
data of the libxml2 library once processing has ended.</p><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetGlobalState"></a>xmlGetGlobalState ()</h3><pre class="programlisting"><a href="libxml-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> xmlGetGlobalState (void);</pre><p>
<a href="libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a>() is called to retrieve the global state for a thread.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the thread global state or NULL in case of error
</td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-c14n.html"><b>&lt;&lt; c14n</b></a></td><td align="right"><a accesskey="n" href="libxml-globals.html"><b>globals &gt;&gt;</b></a></td></tr></table></body></html>