Messages in this thread | | | Subject | Re: [patch] voluntary-preempt-2.6.8-rc2-J3 | From | Junio C Hamano <> | Date | Tue, 27 Jul 2004 01:28:30 -0700 |
| |
>>>>> "AM" == Andrew Morton <akpm@osdl.org> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |