Date: Thu, 3 Jul 2025 17:35:50 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: 4b8b872a9c55 - main - random: Move entropy harvest queue lock macros to random_harvestq.c Message-ID: <202507031735.563HZo3n076096@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=4b8b872a9c55c040eb83f917fc8fd2bf908b96a9 commit 4b8b872a9c55c040eb83f917fc8fd2bf908b96a9 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-07-03 17:21:37 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-07-03 17:21:37 +0000 random: Move entropy harvest queue lock macros to random_harvestq.c They can't be used externally, so it makes no sense to have them in a header. No functional change intended. Reviewed by: cem MFC after: 1 week Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51111 --- sys/dev/random/random_harvestq.c | 5 +++++ sys/dev/random/random_harvestq.h | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c index ccc66019e8ff..1a8cbd9dcad7 100644 --- a/sys/dev/random/random_harvestq.c +++ b/sys/dev/random/random_harvestq.c @@ -161,6 +161,11 @@ static struct harvest_context { } hc_entropy_fast_accumulator; } harvest_context; +#define RANDOM_HARVEST_INIT_LOCK() mtx_init(&harvest_context.hc_mtx, \ + "entropy harvest mutex", NULL, MTX_SPIN) +#define RANDOM_HARVEST_LOCK() mtx_lock_spin(&harvest_context.hc_mtx) +#define RANDOM_HARVEST_UNLOCK() mtx_unlock_spin(&harvest_context.hc_mtx) + static struct kproc_desc random_proc_kp = { "rand_harvestq", random_kthread, diff --git a/sys/dev/random/random_harvestq.h b/sys/dev/random/random_harvestq.h index 69a9dfabd44a..edeb4ff7a17f 100644 --- a/sys/dev/random/random_harvestq.h +++ b/sys/dev/random/random_harvestq.h @@ -40,8 +40,4 @@ struct harvest_event { uint8_t he_source; /* origin of the entropy */ }; -#define RANDOM_HARVEST_INIT_LOCK(x) mtx_init(&harvest_context.hc_mtx, "entropy harvest mutex", NULL, MTX_SPIN) -#define RANDOM_HARVEST_LOCK(x) mtx_lock_spin(&harvest_context.hc_mtx) -#define RANDOM_HARVEST_UNLOCK(x) mtx_unlock_spin(&harvest_context.hc_mtx) - #endif /* SYS_DEV_RANDOM_RANDOM_HARVESTQ_H_INCLUDED */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507031735.563HZo3n076096>