From d89af8f6d5f3b971dda663081c03d790437c2f03 Mon Sep 17 00:00:00 2001 From: comex Date: Sat, 24 Jan 2015 20:04:20 -0500 Subject: Add function to deal with mprotecting RW and back. A bit more complex than the minimum would be... (and minor build fixes) --- lib/stop-other-threads.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/stop-other-threads.h (limited to 'lib/stop-other-threads.h') diff --git a/lib/stop-other-threads.h b/lib/stop-other-threads.h new file mode 100644 index 0000000..1f6e639 --- /dev/null +++ b/lib/stop-other-threads.h @@ -0,0 +1,9 @@ +#pragma once +#include + +/* 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