aboutsummaryrefslogtreecommitdiffstats
path: root/threads.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-10-17 15:58:35 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-10-17 15:58:35 +0000
commit3c01b1d81b696fe8624b6d7e26ec0ebffcc7c06b (patch)
treec6c072df9035dc652fb2f20c87aef0cfdcb3af74 /threads.c
parent7cc95c0b6afdd34cd570c461e71cf696ea19271d (diff)
downloadandroid_external_libxml2-3c01b1d81b696fe8624b6d7e26ec0ebffcc7c06b.tar.gz
android_external_libxml2-3c01b1d81b696fe8624b6d7e26ec0ebffcc7c06b.tar.bz2
android_external_libxml2-3c01b1d81b696fe8624b6d7e26ec0ebffcc7c06b.zip
- include/libxml/globals.h include/libxml/threads.h threads.c
testThreads.c: far more testing, cleaning up bugs - *.c : make sure globals.h is always included. Daniel
Diffstat (limited to 'threads.c')
-rw-r--r--threads.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/threads.c b/threads.c
index 69dfe931..4f1b0b8d 100644
--- a/threads.c
+++ b/threads.c
@@ -332,6 +332,23 @@ xmlGetGlobalState(void)
************************************************************************/
/**
+ * xmlGetThreadId:
+ *
+ * xmlGetThreadId() find the current thread ID number
+ *
+ * Returns the current thread ID number
+ */
+int
+xmlGetThreadId(void)
+{
+#ifdef HAVE_PTHREAD_H
+ return((int) pthread_self());
+#else
+ return((int) 0);
+#endif
+}
+
+/**
* xmlIsMainThread:
*
* xmlIsMainThread() check wether the current thread is the main thread.