summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/uts
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2013-08-24 21:13:38 +0000
committermarkj <markj@FreeBSD.org>2013-08-24 21:13:38 +0000
commit3541d8b1434b233c6420ff91d742fe8b8c53a2e1 (patch)
treeef10dca68a0c1d91a3cc018d4f95de74d267c03f /sys/cddl/contrib/opensolaris/uts
parent6ad648e223be6153dd1674649bfc08d9733aa04a (diff)
downloadFreeBSD-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 'sys/cddl/contrib/opensolaris/uts')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index 9c007e7..babc42c 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -242,7 +242,7 @@ int dtrace_in_probe; /* non-zero if executing a probe */
uintptr_t dtrace_in_probe_addr; /* Address of invop when already in probe */
#endif
static eventhandler_tag dtrace_kld_load_tag;
-static eventhandler_tag dtrace_kld_unload_tag;
+static eventhandler_tag dtrace_kld_unload_try_tag;
#endif
/*
@@ -15351,7 +15351,7 @@ dtrace_kld_load(void *arg __unused, linker_file_t lf)
}
static void
-dtrace_kld_unload(void *arg __unused, linker_file_t lf, int *error)
+dtrace_kld_unload_try(void *arg __unused, linker_file_t lf, int *error)
{
if (*error != 0)
OpenPOWER on IntegriCloud