kernel threading and 1.3.29.....

Randy Chapman (
Tue, 26 Sep 1995 11:06:02 -0700 (PDT)

Is anyone working on a threading library for the new thread-capable stuff
in 1.3.29? If not, I guess I'll bo doing it ;)

Also, I have a question about how clone() works in re to the stack. It
would appear, from my initial testing of it, that the stack is marked as
copy-on-write for each clone()'ed process.

This would seem to me to be a problem should you, say, pass a pointer to
something on the stack to a thread. Say, for example, that main()
defines a C++ object on the stack and sets a global pointer to it.
Unfortunately, each thread will have a separate copy of the object, which
is kinda icky when thats not what most people expect. It isnt what Win32
(ick!) threading, nor Java's green threads nor pthreads does. I dont
have my Solaris machine, so I cant check that yet.

Any way to get around this?