RE: [xml] win32 thread safety patch



Hello again.

Please wait for a day. [...]
[...] I was waiting for your opinion, this is
not really urgent.

And I have talked people to death typing down an essay about Windows TLS,
but forgetting to give you that opinion :-)

Serguei's patch is clean. There is only gain and no loss by applying it, so
let's have it.

The patch to xmlwin32version.h.in and win32config.h which provide the
necessary preprocessor defines are below. I have deactivated thread support
and set the threading model to native per default, hope that is okay for
everyone. I'll do the profiling before I decide if I should enable it in the
binary package.

Ciao
Igor



===================================================================
RCS file: /cvs/gnome/gnome-xml/include/libxml/xmlwin32version.h.in,v
retrieving revision 1.5
diff -c -r1.5 xmlwin32version.h.in
*** xmlwin32version.h.in        2001/11/12 21:35:43     1.5
--- xmlwin32version.h.in        2002/01/11 19:53:09
***************
*** 68,73 ****
--- 68,82 ----
  #endif

  /**
+  * LIBXML_THREADS_ENABLED:
+  *
+  * Whether the thread support is configured in
+  */
+ #if 0
+ #define LIBXML_THREAD_ENABLED
+ #endif
+
+ /**
   * LIBXML_FTP_ENABLED:
   *
   * Whether the FTP support is configured in

===================================================================
RCS file: /cvs/gnome/gnome-xml/include/win32config.h,v
retrieving revision 1.13
diff -c -r1.13 win32config.h
*** win32config.h       2001/10/01 07:36:25     1.13
--- win32config.h       2002/01/11 19:58:53
***************
*** 144,148 ****
--- 144,155 ----
  #define ATTRIBUTE_UNUSED
  #endif

+ /* Define this if you want to use Windows native thread implementation.
+    Undefine it if you wish to use another, pthreads for example. Note
+    that this alone does not enable threads, just specifies the
+    threading model. Threading support is activated in xmlversion.h by
+    defining LIBXML_THREAD_ENABLE. */
+ #define HAVE_WIN32_THREADS
+
  #endif /* __LIBXML_WIN32_CONFIG__ */







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]