static void
stpoll_clock(struct stpoll_ctx *st_ctx)
{
- KKASSERT(mycpuid == 0);
+ globaldata_t gd = mycpu;
+
+ KKASSERT(gd->gd_cpuid == 0);
if (st_ctx->poll_handlers == 0)
return;
- crit_enter();
+ crit_enter_gd(gd);
sched_stpoll(st_ctx);
- crit_exit();
+ crit_exit_gd(gd);
}
#ifdef IFPOLL_MULTI_SYSTIMER
static void
iopoll_clock(struct iopoll_ctx *io_ctx)
{
+ globaldata_t gd = mycpu;
struct timeval t;
int delta, poll_hz;
- KKASSERT(mycpuid == io_ctx->poll_cpuid);
+ KKASSERT(gd->gd_cpuid == io_ctx->poll_cpuid);
if (io_ctx->poll_handlers == 0)
return;
if (io_ctx->phase != 0)
io_ctx->suspect++;
io_ctx->phase = 1;
- crit_enter();
+ crit_enter_gd(gd);
sched_iopoll(io_ctx);
- crit_exit();
+ crit_exit_gd(gd);
io_ctx->phase = 2;
}
if (io_ctx->pending_polls++ > 0)