- 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
diff --git a/threads.c b/threads.c
index 69dfe93..4f1b0b8 100644
--- a/threads.c
+++ b/threads.c
@@ -332,6 +332,23 @@
  ************************************************************************/
 
 /**
+ * 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.