loading multi threaded library into executable enabled for
single thread
Kostik Belousov
kostikbel at gmail.com
Fri Sep 12 16:12:04 UTC 2008
On Fri, Sep 12, 2008 at 09:09:00AM -0700, Jeremy Chadwick wrote:
> On Fri, Sep 12, 2008 at 11:55:01AM -0400, Barry Andrews wrote:
> > Yes, the exe is tclsh. I understand that linking tclsh with libpthread is
> > what would work. However this is very impractical. A user of my library
> > shouldn't have to rebuild their tclsh to match my library specs. Another
> > option would be to ship tclsh with my lib, but that also is a little weird.
> > It seems like the only somewhat practical option I have is to use
> > LD_PRELOAD, which is also weird but better than nothing.
>
> This really isn't a "FreeBSD problem", as the same sort of issue plagues
> other operating systems. When it comes to threading, you want
> *everything* threaded as much as possible -- mix-matching usually does
> not work. The only OS I have seen where that kind of environment works
> reliably is Solaris. I still feel threading is "too new" of a
Yeah, they merged libpthread and libc some time ago, AFAIR :).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20080912/289bb112/attachment.pgp
More information about the freebsd-hackers
mailing list