svn commit: r225860 - user/adrian/if_ath_tx/sys/mips/mips
Alexander Motin
mav at FreeBSD.org
Thu Sep 29 08:15:25 UTC 2011
Adrian Chadd wrote:
> Author: adrian
> Date: Thu Sep 29 03:10:42 2011
> New Revision: 225860
> URL: http://svn.freebsd.org/changeset/base/225860
> + m = intr_disable();
> if (!busy) {
> critical_enter();
> cpu_idleclock();
> }
> - __asm __volatile ("wait");
> +
> + if (sched_runnable())
> + intr_restore(m);
> + else {
> + /* XXX not atomic! */
> + intr_restore(m);
> + __asm __volatile ("wait\n");
> + }
> +
I think that's not good to call intr_disable() before cpu_idleclock().
cpu_idleclock() uses spin mutex to serialize timer hardware accesses,
which disables interrupts. When it enable them back, it will revert
effect of your intr_disable() also.
--
Alexander Motin
More information about the svn-src-user
mailing list