diff options
Diffstat (limited to 'src/plugins/HPMHooking.h')
-rw-r--r-- | src/plugins/HPMHooking.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking.h b/src/plugins/HPMHooking.h index 44970863c..f94dccac4 100644 --- a/src/plugins/HPMHooking.h +++ b/src/plugins/HPMHooking.h @@ -50,11 +50,21 @@ HPExport struct HPMHooking_interface HPMHooking_s; HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->" #funcname, (hook), HPMi->pid) \ ) +#define addHookPrePriv(ifname, funcname, hook) ( \ + (void)((HPMHOOK_pre_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->p->" #funcname, (hook), HPMi->pid) \ + ) + #define addHookPost(ifname, funcname, hook) ( \ (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \ HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->" #funcname, (hook), HPMi->pid) \ ) +#define addHookPostPriv(ifname, funcname, hook) ( \ + (void)((HPMHOOK_post_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->p->" #funcname, (hook), HPMi->pid) \ + ) + /* need better names ;/ */ /* will not run the original function after pre-hook processing is complete (other hooks will run) */ #define hookStop() (HPMi->hooking->HookStop(__func__,HPMi->pid)) |