| From | Sent On | Attachments |
|---|---|---|
| Julian Elischer | Oct 31, 1999 7:08 pm | |
| Julian Elischer | Oct 31, 1999 11:55 pm | |
| John Birrell | Oct 31, 1999 11:56 pm | |
| Michael Schuster - TSC SunOS Germany | Nov 1, 1999 12:51 am | |
| Andrew Reilly | Nov 1, 1999 3:11 am | |
| Daniel Eischen | Nov 1, 1999 4:26 am | |
| Peter Dufault | Nov 1, 1999 4:33 am | |
| Daniel Eischen | Nov 1, 1999 4:33 am | |
| Randell Jesup | Nov 1, 1999 12:28 pm | |
| John Birrell | Nov 1, 1999 1:44 pm | |
| Peter Dufault | Nov 1, 1999 1:52 pm | |
| Jake Burkholder | Nov 1, 1999 3:17 pm | |
| Terry Lambert | Nov 4, 1999 10:03 am | |
| Peter Jeremy | Nov 4, 1999 1:56 pm | |
| Daniel M. Eischen | Nov 4, 1999 2:48 pm | |
| Terry Lambert | Nov 4, 1999 2:49 pm | |
| Terry Lambert | Nov 4, 1999 3:13 pm | |
| Amancio Hasty | Nov 4, 1999 4:48 pm | |
| Russell L. Carter | Nov 4, 1999 5:16 pm | |
| Amancio Hasty | Nov 4, 1999 6:04 pm | |
| Daniel M. Eischen | Nov 4, 1999 7:04 pm | |
| Terry Lambert | Nov 5, 1999 3:00 pm | |
| Terry Lambert | Nov 5, 1999 3:39 pm | |
| Amancio Hasty | Nov 5, 1999 4:07 pm | |
| Daniel C. Sobral | Nov 6, 1999 1:01 am | |
| Chris Csanady | Nov 6, 1999 6:23 pm | |
| Daniel C. Sobral | Nov 6, 1999 11:48 pm | |
| Julian Elischer | Nov 7, 1999 2:11 am |
| Subject: | Re: Threads goals version III | |
|---|---|---|
| From: | Peter Dufault (dufa...@hda.com) | |
| Date: | Nov 1, 1999 1:52:48 pm | |
| List: | org.freebsd.freebsd-arch | |
On Mon, Nov 01, 1999 at 07:33:52AM -0500, Peter Dufault wrote:
4/ All threads in a processs see the same address space (exactly).
Stacks too? Is that a rule implied from POSIX or one for portability?
I think so. There is nothing to stop a thread from passing a pointer to something on it's stack to another thread, assuming that it will ensure that the stack will remain valid. This is common practice where one thread parents one or more child threads and wishes to share information with them.
Obviously he can't return though. Here's what I would argue for in setting a standards document:
main() { int mainvar;
newthread(t1); /* t1 is a thread and it can access mainvar... */
sub(); }
sub() { int subvar;
newthread(t2); /* t2 can access subvar or mainvar, but maybe * t1 can't access subvar. * Maybe the stack just crossed a page boundary. */
while(1) keep_stack_context(); }
Essentially threads would only be guaranteed access to stack variables both in existence and valid when the thread is created. All stack growth can be in separate address spaces.
If a stackless main() creates a bunch of threads at that level and then idles those threads would have completely disjoint stacks.
Peter
-- Peter Dufault (dufa...@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message





