diff options
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 2dff461e932a..f853af193016 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -30,6 +30,7 @@ #include "opt_witness.h" #include "opt_hwpmc_hooks.h" +#include "opt_hwt_hooks.h" #include <sys/systm.h> #include <sys/asan.h> @@ -60,6 +61,9 @@ #ifdef HWPMC_HOOKS #include <sys/pmckern.h> #endif +#ifdef HWT_HOOKS +#include <dev/hwt/hwt_hook.h> +#endif #include <sys/priv.h> #include <security/audit/audit.h> @@ -1002,6 +1006,11 @@ thread_exit(void) } else if (PMC_SYSTEM_SAMPLING_ACTIVE()) PMC_CALL_HOOK_UNLOCKED(td, PMC_FN_THR_EXIT_LOG, NULL); #endif + +#ifdef HWT_HOOKS + HWT_CALL_HOOK(td, HWT_THREAD_EXIT, NULL); +#endif + PROC_UNLOCK(p); PROC_STATLOCK(p); thread_lock(td); |