cvs commit: src/sys/kern kern_mutex.c

Jeff Roberson jroberson at chesapeake.net
Tue Jun 5 19:21:00 UTC 2007


On Tue, 5 Jun 2007, John Baldwin wrote:

> On Tuesday 05 June 2007 02:57:09 pm Attilio Rao wrote:
>> attilio     2007-06-05 18:57:09 UTC
>>
>>   FreeBSD src repository
>>
>>   Modified files:
>>     sys/kern             kern_mutex.c
>>   Log:
>>   Fix a problem with not-preemptive kernels caming from mis-merging of
>>   existing code with the new thread_lock patch.
>>   This also cleans up a bit unlock operation for mutexes.
>>
>>   Approved by: jhb, jeff(mentor)
>
> Specifically, this retires the explicit preemption code in mtx_unlock()
> (inherited from BSD/OS) in the #ifndef PREEMPTION case.  We now only do
> preemptions as a scheduling decision in the scheduler and only
> #ifdef PREEMPTION.

I believe we also should replace thread_lock() and thread_unlock() with 
calls to spinlock_enter()/exit() on !SMP and make thread_set_lock() a 
no-op for this case.  Does that sounds right to everyone?

Thanks,
Jeff

>
> -- 
> John Baldwin
>


More information about the cvs-src mailing list