Re: clone() and pthreads?

Andrew Tridgell (
Thu, 2 May 1996 19:10:10 +1000

> what's clone() doing these days? One guy claimed (via E-Mail) that
> he'd written a clone()-based pthreads package, but didn't answer
> when I asked him where I could get it for testing.

I don't know if anyone is interested, but I used an extended clone()
interface to support the creation of parallel tasks on the AP1000+. In
particular I added a CLONE_OPT flag. If this flag is set then clone()
assumes it received an extra parameter, a pointer to a clone_options
structure, which currently looks like this:

struct clone_options {
int pid; /* desired pid */
int task; /* desired task id */
int cpu; /* desired cpu (currently ignored) */

being able to control the pid and taskid is essential for creating
parallel tasks so that the parallel task has the same pid and taskid
on each cell. This gives them a basis for inter-cell communications.

I'm planning on using more clone extensions in the future to support
remote fork.

So clone() is being used :-)