cvs commit: src/lib/libkse/thread thr_kern.c

Daniel Eischen deischen at freebsd.org
Mon Dec 3 05:47:53 PST 2007


On Sun, 2 Dec 2007, Arno J. Klaassen wrote:

>
> Daniel Eischen <deischen at freebsd.org> writes:
>
>> You could of course try this hack to work-around the problem:
>>
>> Index: thr_kern.c
>> ===================================================================
>> RCS file: /home/ncvs/src/lib/libkse/thread/thr_kern.c,v
>> retrieving revision 1.127
>> diff -u -r1.127 thr_kern.c
>> --- thr_kern.c	30 Nov 2007 17:16:14 -0000	1.127
>> +++ thr_kern.c	1 Dec 2007 23:23:42 -0000
>> @@ -361,6 +361,13 @@
>>   	curthread->kse->k_kcb->kcb_kmbx.km_curthread = NULL;
>>   	curthread->attr.flags |= PTHREAD_SCOPE_SYSTEM;
>>
>> +	/*
>> +	 * This shouldn't be necessary.  It sometimes gets corrupted
>> +	 * after a fork() in SMP.
>> +	 */
>> +	_kcb_set(curthread->kse->k_kcb);
>> +	_tcb_set(curthread->kse->k_kcb, curthread->tcb);
>> +
>>   	/* After a fork(), there child should have no pending signals. */
>>   	sigemptyset(&curthread->sigpend);
>
> Yes, this works. Thanx!
> Is this safe to apply to releng_6 as well?

Yes, it should also work on 6.x.

-- 
DE


More information about the freebsd-java mailing list