summaryrefslogtreecommitdiff
path: root/threads.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-12-10 15:19:08 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-12-10 15:19:08 +0000
commit01c13b5be2d249ef66d86585adee87901bb8efa2 (patch)
tree4ccd7c73e107c3db83ae212ec163e6bc11b9f171 /threads.c
parente1ca50330b59d32b228ad9c05a874a96cef9748f (diff)
downloadlibxml2-01c13b5be2d249ef66d86585adee87901bb8efa2.tar.gz
code cleanup, especially the function comments. fixed a small bug when
* DOCBparser.c HTMLparser.c c14n.c debugXML.c encoding.c hash.c nanoftp.c nanohttp.c parser.c parserInternals.c testC14N.c testDocbook.c threads.c tree.c valid.c xmlIO.c xmllint.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c xmlschemastypes.c xpath.c: code cleanup, especially the function comments. * tree.c: fixed a small bug when freeing nodes which are XInclude ones. Daniel
Diffstat (limited to 'threads.c')
-rw-r--r--threads.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/threads.c b/threads.c
index bd99efda..6aa5ecc3 100644
--- a/threads.c
+++ b/threads.c
@@ -102,7 +102,7 @@ static xmlRMutexPtr xmlLibraryLock = NULL;
static void xmlOnceInit(void);
/**
- * xmlMutexPtr:
+ * xmlNewMutex:
*
* xmlNewMutex() is used to allocate a libxml2 token struct for use in
* synchronizing access to data.
@@ -176,7 +176,7 @@ xmlMutexUnlock(xmlMutexPtr tok ATTRIBUTE_UNUSED)
}
/**
- * xmlRNewMutex:
+ * xmlNewRMutex:
*
* xmlRNewMutex() is used to allocate a reentrant mutex for use in
* synchronizing access to data. token_r is a re-entrant lock and thus useful
@@ -204,7 +204,7 @@ xmlNewRMutex(void)
}
/**
- * xmlRFreeMutex:
+ * xmlFreeRMutex:
* @tok: the reentrant mutex
*
* xmlRFreeMutex() is used to reclaim resources associated with a
@@ -322,14 +322,6 @@ xmlNewGlobalState(void)
#endif /* LIBXML_THREAD_ENABLED */
-/**
- * xmlGetGlobalState:
- *
- * xmlGetGlobalState() is called to retrieve the global state for a thread.
- *
- * Returns the thread global state or NULL in case of error
- */
-
#ifdef HAVE_WIN32_THREADS
#if !defined(HAVE_COMPILER_TLS)
typedef struct _xmlGlobalStateCleanupHelperParams
@@ -338,7 +330,7 @@ typedef struct _xmlGlobalStateCleanupHelperParams
void *memory;
} xmlGlobalStateCleanupHelperParams;
-void xmlGlobalStateCleanupHelper (void *p)
+static void xmlGlobalStateCleanupHelper (void *p)
{
xmlGlobalStateCleanupHelperParams *params = (xmlGlobalStateCleanupHelperParams *) p;
WaitForSingleObject(params->thread, INFINITE);
@@ -350,6 +342,13 @@ void xmlGlobalStateCleanupHelper (void *p)
#endif /* HAVE_COMPILER_TLS */
#endif /* HAVE_WIN32_THREADS */
+/**
+ * xmlGetGlobalState:
+ *
+ * xmlGetGlobalState() is called to retrieve the global state for a thread.
+ *
+ * Returns the thread global state or NULL in case of error
+ */
xmlGlobalStatePtr
xmlGetGlobalState(void)
{