Change visibility of AlignedContext and functions

This commit is contained in:
Tiziano Marra
2026-07-12 16:40:21 +02:00
committed by GitHub
parent 4a1bf03025
commit 8798e6b8b9
+3 -3
View File
@@ -90,7 +90,7 @@ use windows_sys::{
/// with `#[repr(C, align(16))]`. Without this, `movdqa` raises a /// with `#[repr(C, align(16))]`. Without this, `movdqa` raises a
/// `#GP` (General Protection) fault. /// `#GP` (General Protection) fault.
#[repr(C, align(16))] #[repr(C, align(16))]
pub(crate) struct AlignedContext(pub(crate) CONTEXT); struct AlignedContext(CONTEXT);
/// Shared state passed between all three execution phases. /// 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 /// at 0 and the dispatcher retries. Under normal conditions, the loop
/// executes exactly once. /// executes exactly once.
#[cfg(all(target_arch = "x86_64", target_os = "windows"))] #[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 // Stamp the self-referencing cookie used by the callback to
// validate the pointer retrieved from TEB.ArbitraryUserPointer. // validate the pointer retrieved from TEB.ArbitraryUserPointer.
embedded_ctx.magic = from_ref(embedded_ctx) as u64; 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 /// 7. Calls `user_mode_continue` to perform the CET-safe context
/// switch into the enum function. /// switch into the enum function.
#[cfg(all(target_arch = "x86_64", target_os = "windows"))] #[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, mut _instance: PTP_CALLBACK_INSTANCE,
context : *mut c_void, context : *mut c_void,
mut _work : PTP_WORK mut _work : PTP_WORK