Skip to main content

dr_register_nudge_event

Function dr_register_nudge_event 

Source
pub unsafe extern "C" fn dr_register_nudge_event(
    func: Option<unsafe extern "C" fn(drcontext: *mut c_void, argument: uint64)>,
    id: client_id_t,
)
Expand description

Registers a callback function for nudge events. External entities can nudge a process through the dr_nudge_process() or dr_nudge_pid() drconfig API routines on Windows or using the \p drnudgeunix tool on Linux. A client in this process can use dr_nudge_client() to raise a nudge, while a client in another process can use dr_nudge_client_ex().

DR calls \p func whenever the current process receives a nudge. On Windows, the nudge event is delivered in a new non-application thread. Callers must specify the target client by passing the client ID that was provided in dr_client_main().