Rainer Orth wrote:
> James Carlson <[email protected]> writes:
>> That's all changed now that the threads libraries have been folded into
>> libc.  There's no such thing as purely unthreaded any more -- just
>> multithreaded applications that happen to have only one thread -- and
>> all of the calls are "live" all of the time.
> 
> Right.  I think I'm going for linking -lpthread and/or -lthread with
> -pthread/-threads -shared in GCC even on Solaris 8 and 9 and add
> -L/usr/lib/lwp -R/usr/lib/lwp on Solaris 8.  The alternative of having
> the user specify all that (and spread the necessary knowledge all over
> the GCC tree) is just unacceptable.

You might not want to do that.  You'll be forcing single-threaded
applications on those older OSes to become suddenly and rather
unexpectedly multi-threaded, regardless of what the application author
had intended.

If you're lucky, the result will merely be slower execution times.  If
you're unlucky, you'll trigger latent behavior that actually breaks
something.  (It's not *completely* unknown for single-threaded
applications to have latent MT code that -- due to the stubs -- does
nothing, but that when activated with a real threads library actually
has bugs that cause deadlocks or worse.)

As for the rest of what you're saying, I guess I'm just confused.  I
don't see why you'd have to do anything special for those older
releases.  The stubs in libc should take care of it for you and
shouldn't require any heroics.

-- 
James Carlson         42.703N 71.076W         <[email protected]>
_______________________________________________
tools-compilers mailing list
[email protected]

Reply via email to