Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jul 2025 17:35:49 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6ccf1801f225 - main - random: Replace a comment with a static assertion
Message-ID:  <202507031735.563HZnXu076062@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=6ccf1801f225a5e3e71d5b707646731542a994c7

commit 6ccf1801f225a5e3e71d5b707646731542a994c7
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-07-03 17:21:18 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-07-03 17:21:18 +0000

    random: Replace a comment with a static assertion
    
    No functional change intended.
    
    Reviewed by:    cem
    MFC after:      1 week
    Sponsored by:   Stormshield
    Sponsored by:   Klara, Inc.
    Differential Revision:  https://reviews.freebsd.org/D51110
---
 sys/dev/random/random_harvestq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c
index 379b64ac15f1..ccc66019e8ff 100644
--- a/sys/dev/random/random_harvestq.c
+++ b/sys/dev/random/random_harvestq.c
@@ -212,9 +212,10 @@ random_kthread(void)
 	kproc_exit(0);
 	/* NOTREACHED */
 }
-/* This happens well after SI_SUB_RANDOM */
 SYSINIT(random_device_h_proc, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, kproc_start,
     &random_proc_kp);
+_Static_assert(SI_SUB_KICK_SCHEDULER > SI_SUB_RANDOM,
+    "random kthread starting before subsystem initialization");
 
 static void
 rs_epoch_init(void *dummy __unused)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507031735.563HZnXu076062>