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

Re: pthreads in hurd



On Mon, Mar 05, 2001 at 11:28:23PM -0500, Igor Khavkine wrote:
> On Mon, Mar 05, 2001 at 06:13:01PM +0100, Erik Verbruggen wrote:

[snip]

> > I got it, and checked some functions. If I understand the TODO file
> > correctly, only pthread_sigmask and sigwait have to be completed. I'm
> > now checking Hurd and glibc to see how signals propagate in Hurd.
> > 
> > Erik.
> 
> Yes and no. The other part of the code that's not done yet is in the
> actual thread creation. Try to trace through the pthread_create call,
> you'll find that the code gets confused when the Mach thread has
> to be created. I got confused then because I found two different functions
> which seemed to do the same thing, __mach_thread_setup() and
> __mach_setup_thread(). One was already in the glibc and the other
> was only in the pthread patch. And didn't finnish sorting through them
> when I stopped working on the code.

I see. It winds down to the stack creation: __mach_thread_setup does not
do stack allocation, while __mach_setup_thread does do stack allocation.
To add up to the confusion, sysdeps/generic/bits/pt-attr.h states just
before the struct __pthread_attr declaration:

/* This structure describes the attributes of a POSIX thread.  The
   stackaddr and stacksize attributes are not supported, but the
   corresponding members are used internally.  */

Solaris does support the stack attribute, Linux doesn't. If we do
support it, this comment will have to be changed. But that's for later.
Ok, that's it for now, you'll hear more when I've managed to build
things.

Erik.



Reply to: