-/* $OpenBSD: kern_clockintr.c,v 1.62 2023/10/17 00:04:02 cheloha Exp $ */
+/* $OpenBSD: kern_clockintr.c,v 1.63 2024/01/15 01:15:37 cheloha Exp $ */
/*
* Copyright (c) 2003 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
mtx_enter(&cq->cq_mtx);
cq->cq_running = NULL;
- if (ISSET(cl->cl_flags, CLST_IGNORE_REQUEST)) {
- CLR(cl->cl_flags, CLST_IGNORE_REQUEST);
+ if (ISSET(cq->cq_flags, CQ_IGNORE_REQUEST)) {
+ CLR(cq->cq_flags, CQ_IGNORE_REQUEST);
CLR(request->cr_flags, CR_RESCHEDULE);
}
if (ISSET(request->cr_flags, CR_RESCHEDULE)) {
}
}
if (cl == cq->cq_running)
- SET(cl->cl_flags, CLST_IGNORE_REQUEST);
+ SET(cq->cq_flags, CQ_IGNORE_REQUEST);
mtx_leave(&cq->cq_mtx);
}
}
}
if (cl == cq->cq_running)
- SET(cl->cl_flags, CLST_IGNORE_REQUEST);
+ SET(cq->cq_flags, CQ_IGNORE_REQUEST);
}
void
-/* $OpenBSD: clockintr.h,v 1.23 2023/10/17 00:04:02 cheloha Exp $ */
+/* $OpenBSD: clockintr.h,v 1.24 2024/01/15 01:15:37 cheloha Exp $ */
/*
* Copyright (c) 2020-2022 Scott Cheloha <cheloha@openbsd.org>
*
};
#define CLST_PENDING 0x00000001 /* scheduled to run */
-#define CLST_IGNORE_REQUEST 0x00000002 /* ignore callback requests */
/*
* Interface for callback rescheduling requests.
struct clockintr_stat cq_stat; /* [o] dispatch statistics */
volatile uint32_t cq_gen; /* [o] cq_stat update generation */
volatile uint32_t cq_dispatch; /* [o] dispatch is running */
- uint32_t cq_flags; /* [I] CQ_* flags; see below */
+ uint32_t cq_flags; /* [m] CQ_* flags; see below */
};
#define CQ_INIT 0x00000001 /* clockintr_cpu_init() done */
#define CQ_INTRCLOCK 0x00000002 /* intrclock installed */
-#define CQ_STATE_MASK 0x00000003
+#define CQ_IGNORE_REQUEST 0x00000004 /* ignore callback requests */
+#define CQ_STATE_MASK 0x00000007
void clockintr_cpu_init(const struct intrclock *);
int clockintr_dispatch(void *);