Re: [patch] voluntary-preempt-2.6.8-rc2-J3

From: Junio C Hamano
Date: Tue Jul 27 2004 - 03:29:27 EST


>>>>> "AM" == Andrew Morton <akpm@xxxxxxxx> writes:

AM> +#ifdef CONFIG_SMP
AM> +#define cond_resched_lock(lock, counter, limit) \
AM> + do { \
AM> + if (++(counter) >= limit) { \
AM> + spin_unlock(lock); \
AM> + cpu_relax(); \
AM> + spin_lock(lock); \
AM> + } \
AM> + (counter) = 0; \
AM> + } while (0)
AM> +#else

I am wondering if you meant to reset the counter to zero inside
of the if(){}, probably after reaquiring the lock...



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