Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177927576
D54142.1795584258.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
825 B
Referenced Files
None
Subscribers
None
D54142.1795584258.diff
View Options
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c
--- a/sys/kern/subr_rman.c
+++ b/sys/kern/subr_rman.c
@@ -102,8 +102,10 @@
static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager");
-struct rman_head rman_head;
+struct rman_head rman_head = TAILQ_HEAD_INITIALIZER(rman_head);
static struct mtx rman_mtx; /* mutex to protect rman_head */
+MTX_SYSINIT(rman_mtx, &rman_mtx, "rman head", MTX_DEF);
+
static int int_rman_release_resource(struct rman *rm, struct resource_i *r);
static __inline struct resource_i *
@@ -121,14 +123,6 @@
int
rman_init(struct rman *rm)
{
- static int once = 0;
-
- if (once == 0) {
- once = 1;
- TAILQ_INIT(&rman_head);
- mtx_init(&rman_mtx, "rman head", NULL, MTX_DEF);
- }
-
if (rm->rm_start == 0 && rm->rm_end == 0)
rm->rm_end = ~0;
if (rm->rm_type == RMAN_UNINIT)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 25, 5:24 AM (5 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41957528
Default Alt Text
D54142.1795584258.diff (825 B)
Attached To
Mode
D54142: rman: Simplify initialization of internal globals
Attached
Detach File
Event Timeline