Re: [xml] libxml2 and pthreads

On Thu, Aug 19, 2004 at 03:29:30PM -0700, Ben Greear wrote:
Daniel Veillard wrote:
On Thu, Aug 19, 2004 at 12:57:31PM -0700, Ben Greear wrote:

 That would force existing threaded apps using libxml2 to change
their initialization code, basically an API/ABI break. Impossible at this
point, sorry !

Not really.  The default behaviour could have the current initialization 
initialize the locks with pthread-related methods.  But, if a distribution
wanted to have a pthread-less (but still potentially thread-safe) libxml,
then they can compile it w/out pthreads and patch any threaded applications
to use the new external lock initialization logic.

  Okay why not, but it won't change the requirement on pthreads by
default if compiled with --with-threads on Linux. If you make a patch I
will look at it :-)

 There is an alternative, at least on Linux/gcc but Jakub never provided
the patch or information on how to really do so:

This is not available to non-redhat people it seems.

 Basically using "#pragma weak" for the symbols referenced from libpthread
but this is a glibc/gcc specific solution.


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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