kern_module.c (677b542ea243380af64822b30e4ef5f7a6d978ee) kern_module.c (65a311fcb2f44fce7eb05160d3198cefed5c27f9)
1/*-
2 * Copyright (c) 1997 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 201 unchanged lines hidden (view full) ---

210
211 TAILQ_FOREACH(mod, &modules, link)
212 if (mod->id == modid)
213 return(mod);
214 return (NULL);
215}
216
217int
1/*-
2 * Copyright (c) 1997 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 201 unchanged lines hidden (view full) ---

210
211 TAILQ_FOREACH(mod, &modules, link)
212 if (mod->id == modid)
213 return(mod);
214 return (NULL);
215}
216
217int
218module_unload(module_t mod)
218module_unload(module_t mod, int flags)
219{
219{
220 int error;
220
221
222 error = MOD_EVENT(mod, MOD_QUIESCE);
223 if (error == EOPNOTSUPP)
224 error = 0;
225 if (flags == LINKER_UNLOAD_NORMAL && error != 0)
226 return (error);
221 return (MOD_EVENT(mod, MOD_UNLOAD));
222}
223
224int
225module_getid(module_t mod)
226{
227
228 MOD_LOCK_ASSERT;

--- 167 unchanged lines hidden ---
227 return (MOD_EVENT(mod, MOD_UNLOAD));
228}
229
230int
231module_getid(module_t mod)
232{
233
234 MOD_LOCK_ASSERT;

--- 167 unchanged lines hidden ---