MCPcopy Create free account
hub / github.com/F-Stack/f-stack / module_release

Function module_release

freebsd/kern/kern_module.c:193–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void
194module_release(module_t mod)
195{
196
197 MOD_XLOCK_ASSERT;
198
199 if (mod->refs <= 0)
200 panic("module_release: bad reference count");
201
202 MOD_DPF(REFS, ("module_release: before, refs=%d\n", mod->refs));
203
204 mod->refs--;
205 if (mod->refs == 0) {
206 TAILQ_REMOVE(&modules, mod, link);
207 if (mod->file)
208 TAILQ_REMOVE(&mod->file->modules, mod, flink);
209 free(mod, M_MODULE);
210 }
211}
212
213module_t
214module_lookupbyname(const char *name)

Callers 2

module_register_initFunction · 0.85
linker_file_unloadFunction · 0.85

Calls 2

panicFunction · 0.70
freeFunction · 0.70

Tested by

no test coverage detected