kernel - Rewrite the callout_*() API (3)
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 27 Mar 2019 23:26:06 +0000 (16:26 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 27 Mar 2019 23:26:06 +0000 (16:26 -0700)
* Fix callout_reset_bycpu() (it was queueing to the current cpu
  instead of the specified cpu).

sys/kern/kern_timeout.c

index 42938a1..af52ed9 100644 (file)
@@ -991,7 +991,7 @@ callout_reset_bycpu(struct callout *cc, int to_ticks, void (*ftn)(void *),
         */
        atomic_set_int(&c->flags, CALLOUT_RESET);
 
-       sc = softclock_pcpu_ary[mycpu->gd_cpuid];
+       sc = softclock_pcpu_ary[cpuid];
        c->rsc = sc;
        c->rtick = sc->curticks + to_ticks;
        c->rfunc = ftn;