> > You could avoid the additional pointer by letting
> > child_tidptr = (!(flags & CLONE_VM) && current->user_tid) ?
> > current->user_tid : parent_tidptr;
>
> This doesn't work since it would overwrite the TID field in the calling
> thread's descriptor.
No: for the pthread_create case you would pass the pointer to new struct
pthread tid in parent_tidptr, while for fork you would pass the
parameter of cfork as parent_tidptr and child_tidptr would be inherited.
However I don't think that this is a good interface, just a bit better
than having two flags and a single pointer.
This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:21 EST