From owner-freebsd-hackers Sun May 18 15:28:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA18667 for hackers-outgoing; Sun, 18 May 1997 15:28:33 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id PAA18662 for ; Sun, 18 May 1997 15:28:31 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id PAA22876; Sun, 18 May 1997 15:20:03 -0700 From: Terry Lambert Message-Id: <199705182220.PAA22876@phaeton.artisoft.com> Subject: Re: GNAT-pthreads integration bugs/questions To: deischen@iworks.InterWorks.org (Daniel M. Eischen) Date: Sun, 18 May 1997 15:20:03 -0700 (MST) Cc: jb@freebsd1.cimlogic.com.au, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199705180700.CAA20456@iworks.InterWorks.org> from "Daniel M. Eischen" at May 18, 97 02:00:19 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > A couple things I can't do with rfork (or don't know how to do using > other mechanisms) is to explicitly set the stack size (as in > pthread_attr_setstacksize), This is a bogosity of POSIX threads. It comes from the idea that thread stacks can't be alloed to auto-grow. This is a stupid idea, and should be done away with in the POSIX standard. Preallocating a set stack size is Just Plain Wrong(tm). With an rfork, you will get another process with it's own stack, so the stack auto-grows: there's no need to make the call to "set it larger than the default" like there is with bogus implementations of thread stacks. > mutexes and condition variables (could use SYSV semaphores I suppose), Yes, or socketpair() or some other blocking IPC mechanism, like the SysV stuff. There is a real lack of synchronization primitives in UNIX. > and the ability to create a key (pthread_key_create) that is specific > to each process - like taskVarAdd() in VxWorks :-) Why not call getpid()? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.