On 3/24/10 7:32 PM, enami tsugutomo wrote: > The _lwp_ctl() call also need to be called with &self->pt_lwpctl > doesn't it?
I thought pthread__first would be the same as pthread__self() here, but when I just used pthread__first rather than calling pthread__self() I got a different value. I don't know if this means pthread__first() is no longer correct either and needs to be reset, or I had some other bug in this very simple change. --Michael > > enami. > > @@ -235,11 +235,14 @@ > static void > pthread__fork_callback(void) > { > + struct __pthread_st *self; > > /* lwpctl state is not copied across fork. */ > if (_lwp_ctl(LWPCTL_FEATURE_CURCPU, &pthread__first->pt_lwpctl)) { > err(1, "_lwp_ctl"); > } > + self = pthread__self(); > + self->pt_lid = _lwp_self(); > } > > static void >