Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Oct 1995 12:35:59 +1000 (EST)
From:      John Birrell <cimaxp1!jb@werple.net.au>
To:        ref.tfs.com!julian@werple.net.au (Julian Elischer)
Cc:        hackers@freebsd.org, jb@cimlogic.com.au
Subject:   Re: NetBSD/FreeBSD (pthreads)
Message-ID:  <199510210233.MAA05412@werple.net.au>
In-Reply-To: <199510210023.RAA01021@ref.tfs.com> from "Julian Elischer" at Oct 20, 95 05:23:53 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Julian,

> I think that it is important that you do talk with Chris P about the Pthreads
> implimentation because we don't want to have two competing camps in out system
> with regards to threads..

Chris sent me mail yesterday and I have sent a reply with an explanation of
some of the issues we addressed. He pointed out that POSIX requires a global
set of signal handlers. I guess you'd prefer to stick as close to POSIX as
you can? We can live with a global set of signal handlers (like we do with
OSF/1). It just seemed nice to do it thread by thread. 8-(.

> I see no reason why the libc changes can't be incorporated on one condition..
> THAT THEY CAN BE COMPILED IN A MODE THAT LEAVES THEM AS THEY ARE.

Agreed. 

We add -D_THREAD_SAFE when we compile/assemble a threaded version.
Without this, the code preprocesses to virtually the same thing. I say
'virtually' because we often change:

    return(foo(bar));

to

	ret = foo(bar);
#ifdef	_THREAD_SAFE
	something
#endif
	return(ret);

> (If this sounds like a lot of work for you, I appologise but remember
> that we are all doing this as a hobby and it's no-body's job
> to clean up after others..)

Many of the changes to libc code are minor. I'm not sure how the man pages
should document the threaded behavio[u]r though.

> 
> and work out a common angle of attack on the problem..
> Chris is our guide on threads stuff in general but of course
> anyone more active could 'take over'..
> We DO want to support pthreads (I have cthreads running at TFS)

Jordan tells me that he and davidg discussed the integration of pthreads into
libc with Chris at USENIX and the discussion went "almost word-for-word" like
the one we're now having. 8-).


-- 
John Birrell                                CIMlogic Pty Ltd
jb@cimlogic.com.au                          119 Cecil Street
Ph  +61  3 9690 9600                        South Melbourne Vic 3205
Fax +61  3 9690 6650                        Australia
Mob +61 18  353  137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510210233.MAA05412>