From 8798e6b8b9cee82089ce7d5e1acbd4d56acbc540 Mon Sep 17 00:00:00 2001 From: Tiziano Marra <29025198+MrTiz@users.noreply.github.com> Date: Sun, 12 Jul 2026 16:40:21 +0200 Subject: [PATCH] Change visibility of AlignedContext and functions --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 34dad95..0a516d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,7 +90,7 @@ use windows_sys::{ /// with `#[repr(C, align(16))]`. Without this, `movdqa` raises a /// `#GP` (General Protection) fault. #[repr(C, align(16))] -pub(crate) struct AlignedContext(pub(crate) CONTEXT); +struct AlignedContext(CONTEXT); /// Shared state passed between all three execution phases. /// @@ -343,7 +343,7 @@ fn manual_stack_unwind_zw_protect_virtual_memory( /// at 0 and the dispatcher retries. Under normal conditions, the loop /// executes exactly once. #[cfg(all(target_arch = "x86_64", target_os = "windows"))] -pub(crate) fn thread_pool_dispatcher(embedded_ctx: &mut EmbeddedContext) { +fn thread_pool_dispatcher(embedded_ctx: &mut EmbeddedContext) { // Stamp the self-referencing cookie used by the callback to // validate the pointer retrieved from TEB.ArbitraryUserPointer. embedded_ctx.magic = from_ref(embedded_ctx) as u64; @@ -391,7 +391,7 @@ pub(crate) fn thread_pool_dispatcher(embedded_ctx: &mut EmbeddedContext) { /// 7. Calls `user_mode_continue` to perform the CET-safe context /// switch into the enum function. #[cfg(all(target_arch = "x86_64", target_os = "windows"))] -pub extern "system" fn thread_pool_worker_enum( +extern "system" fn thread_pool_worker_enum( mut _instance: PTP_CALLBACK_INSTANCE, context : *mut c_void, mut _work : PTP_WORK