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 
code
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:

 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115806

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

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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