svn commit: r207140 - in user/kmacy/head_page_lock_2/sys: amd64/amd64 kern sys

K. Macy kmacy at freebsd.org
Tue Apr 27 19:53:47 UTC 2010


On Tue, Apr 27, 2010 at 10:06 AM, John Baldwin <jhb at freebsd.org> wrote:
> On Saturday 24 April 2010 1:03:42 am Kip Macy wrote:
>> Author: kmacy
>> Date: Sat Apr 24 05:03:42 2010
>> New Revision: 207140
>> URL: http://svn.freebsd.org/changeset/base/207140
>>
>> Log:
>>   generalize lock stack operations and move to subr_lock.c
>>
>> Modified:
>>   user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c
>>   user/kmacy/head_page_lock_2/sys/kern/kern_mutex.c
>>   user/kmacy/head_page_lock_2/sys/kern/subr_lock.c
>>   user/kmacy/head_page_lock_2/sys/sys/lock.h
>>
>> Modified: user/kmacy/head_page_lock_2/sys/kern/kern_mutex.c
>>
> ==============================================================================
>> --- user/kmacy/head_page_lock_2/sys/kern/kern_mutex.c Sat Apr 24 03:11:35
> 2010    (r207139)
>> +++ user/kmacy/head_page_lock_2/sys/kern/kern_mutex.c Sat Apr 24 05:03:42
> 2010    (r207140)
>> @@ -160,7 +185,7 @@ unlock_mtx(struct lock_object *lock)
>>       struct mtx *m;
>>
>>       m = (struct mtx *)lock;
>> -     mtx_assert(m, MA_OWNED | MA_NOTRECURSED);
>> +     mtx_assert(m, MA_OWNED);
>>       mtx_unlock(m);
>>       return (0);
>>  }
>
> Note that this breaks the assertion used to prevent passing a recursed mutex
> to mtx_sleep() or cv_wait().
>

Thanks. MA_NOTRECURSED breaks its use in lock_stack, I'll add another
function for it too.

-Kip


More information about the svn-src-user mailing list