This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: get/set/swapcontext + linuxthreads/glibc + MTasker
- From: bert hubert <ahu at ds9a dot nl>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com, phil-list at redhat dot com
- Date: Fri, 17 Jan 2003 12:32:56 +0100
- Subject: Re: get/set/swapcontext + linuxthreads/glibc + MTasker
- References: <20030117111609.GA3963@outpost.ds9a.nl> <3E27E7EF.6040301@redhat.com>
On Fri, Jan 17, 2003 at 11:24:31AM +0000, Ulrich Drepper wrote:
> > Is there a fundamental reason why get/set/swapcontext and linuxthreads bite
> > eachother?
>
> In some configurations the stack pointer is used to identify the thread
> pointer. Therefore it is impossible to reliably use the *context
> functions together with LinuxThreads.
Thanks for the swift answer.
> > Would this be a problem for NPTL?
>
> Have you tried it? Me neither, but I don't see a problem.
I will soon but right now I would be *far* happier if the patches needed
were in the gcc mainline. I have no aversion to redhat, far from it, but I'd
prefer to see this work heading in the direction of the mainline gcc.
I'm somewhat holding off until I can get a working test setup that consists
of mainline branches, albeit very experimental ones. I can however report
that our program PowerMail (open source, http://powerdns.com/powermail) is
almost twice as fast on Phoebe than on my Debian box! It is heavily
threaded.
> Don't use sigaltstack in multi-threaded programs. Just think a second
> about the desasters which would happen if two signals arrive at the same
> time and are handled by different threads.
I'd rather not :-(.
Regards,
bert
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
http://netherlabs.nl Consulting