summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_clockintr.c10
-rw-r--r--sys/sys/clockintr.h8
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/kern_clockintr.c b/sys/kern/kern_clockintr.c
index c9f5fd2cd49..6e771a043ba 100644
--- a/sys/kern/kern_clockintr.c
+++ b/sys/kern/kern_clockintr.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -220,8 +220,8 @@ clockintr_dispatch(void *frame)
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)) {
@@ -333,7 +333,7 @@ clockintr_cancel(struct clockintr *cl)
}
}
if (cl == cq->cq_running)
- SET(cl->cl_flags, CLST_IGNORE_REQUEST);
+ SET(cq->cq_flags, CQ_IGNORE_REQUEST);
mtx_leave(&cq->cq_mtx);
}
@@ -384,7 +384,7 @@ clockintr_schedule_locked(struct clockintr *cl, uint64_t expiration)
}
}
if (cl == cq->cq_running)
- SET(cl->cl_flags, CLST_IGNORE_REQUEST);
+ SET(cq->cq_flags, CQ_IGNORE_REQUEST);
}
void
diff --git a/sys/sys/clockintr.h b/sys/sys/clockintr.h
index 967e0f9f95c..350694edcf3 100644
--- a/sys/sys/clockintr.h
+++ b/sys/sys/clockintr.h
@@ -1,4 +1,4 @@
-/* $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>
*
@@ -68,7 +68,6 @@ struct clockintr {
};
#define CLST_PENDING 0x00000001 /* scheduled to run */
-#define CLST_IGNORE_REQUEST 0x00000002 /* ignore callback requests */
/*
* Interface for callback rescheduling requests.
@@ -108,12 +107,13 @@ struct clockintr_queue {
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 *);