diff options
author | markj <markj@FreeBSD.org> | 2013-08-24 21:13:38 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-08-24 21:13:38 +0000 |
commit | 3541d8b1434b233c6420ff91d742fe8b8c53a2e1 (patch) | |
tree | ef10dca68a0c1d91a3cc018d4f95de74d267c03f /share | |
parent | 6ad648e223be6153dd1674649bfc08d9733aa04a (diff) | |
download | FreeBSD-src-3541d8b1434b233c6420ff91d742fe8b8c53a2e1.zip FreeBSD-src-3541d8b1434b233c6420ff91d742fe8b8c53a2e1.tar.gz |
Rename the kld_unload event handler to kld_unload_try, and add a new
kld_unload event handler which gets invoked after a linker file has been
successfully unloaded. The kld_unload and kld_load event handlers are now
invoked with the shared linker lock held, while kld_unload_try is invoked
with the lock exclusively held.
Convert hwpmc(4) to use these event handlers instead of having
kern_kldload() and kern_kldunload() invoke hwpmc(4) hooks whenever files are
loaded or unloaded. This has no functional effect, but simplifes the linker
code somewhat.
Reviewed by: jhb
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/EVENTHANDLER.9 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/man/man9/EVENTHANDLER.9 b/share/man/man9/EVENTHANDLER.9 index c3b646d..d6e7556 100644 --- a/share/man/man9/EVENTHANDLER.9 +++ b/share/man/man9/EVENTHANDLER.9 @@ -202,6 +202,8 @@ Callbacks invoked when a BPF listener attaches to/detaches from network interfac .It Vt kld_load Callbacks invoked after a linker file has been loaded. .It Vt kld_unload +Callbacks invoked after a linker file has been successfully unloaded. +.It Vt kld_unload_try Callbacks invoked before a linker file is about to be unloaded. These callbacks may be used to return an error and prevent the unload from proceeding. |