lkml.org 
[lkml]   [2002]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] updated low-latency zap_page_range
Robert Love wrote:
>
> ...
> +static inline void cond_resched_lock(spinlock_t * lock)
> +{
> + if (need_resched() && preempt_count() == 1) {
> + _raw_spin_unlock(lock);
> + preempt_enable_no_resched();
> + __cond_resched();
> + spin_lock(lock);
> + }
> +}

Maybe I'm being thick. How come a simple spin_unlock() in here
won't do the right thing?

And this won't _really_ compile to nothing with CONFIG_PREEMPT=n,
will it? It just does nothing because preempt_count() is zero?


-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.068 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site