From 2795a1a5b34bffc350f9366fcf05a6165067eafa Mon Sep 17 00:00:00 2001 From: comex Date: Wed, 21 Jan 2015 18:24:08 -0500 Subject: stopping other threads. --- lib/substitute-internal.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/substitute-internal.h') diff --git a/lib/substitute-internal.h b/lib/substitute-internal.h index f078688..80052f9 100644 --- a/lib/substitute-internal.h +++ b/lib/substitute-internal.h @@ -64,9 +64,15 @@ enum { * is to be root */ SUBSTITUTE_ERR_TASK_FOR_PID = 1000, - /* substitute_dlopen_in_pid: something didn't work */ SUBSTITUTE_ERR_MISC, }; int substitute_dlopen_in_pid(int pid, const char *filename, int options, char **error); #endif + +/* Stop the world; return token to be used for applying PC patches and resuming. */ +int stop_other_threads(void **token_ptr); +int apply_pc_patch_callback(void *token, + uintptr_t (*pc_patch_callback)(void *ctx, uintptr_t pc), + void *ctx); +int resume_other_threads(void *token); -- cgit v1.2.3