From 21667e74356986f558ce4489239203f8b8858ae8 Mon Sep 17 00:00:00 2001 From: joii2020 Date: Sun, 29 Sep 2024 18:39:40 +0800 Subject: [PATCH] Add Pin for Global data --- src/global_data.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/global_data.rs b/src/global_data.rs index cdc0d26..c31097c 100644 --- a/src/global_data.rs +++ b/src/global_data.rs @@ -2,11 +2,12 @@ use crate::process_info::TxContext; use std::{ collections::HashMap, ffi::c_void, + pin::Pin, sync::{Mutex, MutexGuard}, }; lazy_static! { - static ref GLOBAL_DATA: Mutex = Default::default(); + static ref GLOBAL_DATA: Pin> = Default::default(); } static mut GLOBAL_DATA_PTR: *mut Mutex = std::ptr::null_mut();