lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] Allow rwlocks to re-enable interrupts
From
Date
On Wed, 2008-10-22 at 10:34 +0200, Petr Tesarik wrote:
> c b/kernel/spinlock.c
> index 29ab207..f769d8a 100644
> --- a/kernel/spinlock.c
> +++ b/kernel/spinlock.c
> @@ -121,7 +121,11 @@ unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock)
> local_irq_save(flags);
> preempt_disable();
> rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
> +#ifdef CONFIG_LOCKDEP
> LOCK_CONTENDED(lock, _raw_read_trylock, _raw_read_lock);
> +#else
> + _raw_read_lock_flags(lock, &flags);
> +#endif
> return flags;
> }

That should be CONFIG_LOCK_STAT.

But aside from that, I really don't like this change, I'd rather you'd
create a LOCK_CONTENDED_FLAGS() that can deal with this.




\
 
 \ /
  Last update: 2008-10-22 10:47    [W:0.040 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site