aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2025-06-18 15:15:18 +0000
committerOlivier Certner <olce@FreeBSD.org>2025-06-18 16:00:13 +0000
commit013c58ced6aef26bad7ca5c6eb829b9d586f6edb (patch)
tree7b1851d527207c384c9225b7ff993733c88bdf48
parent63c9b018069b58bacb2875c83c676cc8c4f40d69 (diff)
sched_ule: 32-bit platforms: Fix runq_print() after runq changes
The compiler would report a mismatch between the format and the actual type of the runqueue status word because the latter is now unconditionally defined as an 'unsigned long' (which has the "natural" platform size) and the format expects a 'size_t', which expands to an 'unsigned int' on 32-bit platforms (although they are both of the same actual size). This worked before as the C type used depended on the architecture and was set to 'uint32_t' aka 'unsigned int' on these 32-bit platforms. Just fix the format (use 'l'). While here, remove outputting '0x' by hand, instead relying on '#' (only difference is for 0, and is fine). runq_print() should be moved out of 'sched_ule.c' in a subsequent commit. Reported by: Jenkins Fixes: 79d8a99ee583 ("runq: Deduce most parameters, remove machine headers") MFC after: 1 month Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/kern/sched_ule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 0002424fa547..508ec0ab97ec 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -444,7 +444,7 @@ runq_print(struct runq *rq)
int i;
for (i = 0; i < RQSW_NB; i++) {
- printf("\t\trunq bits %d 0x%zx\n",
+ printf("\t\trunq bits %d %#lx\n",
i, rq->rq_status.rq_sw[i]);
for (j = 0; j < RQSW_BPW; j++)
if (rq->rq_status.rq_sw[i] & (1ul << j)) {