Skip to content

Commit

Permalink
Add Pin for Global data
Browse files Browse the repository at this point in the history
  • Loading branch information
joii2020 committed Sep 29, 2024
1 parent 24e5295 commit 6162144
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/global_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<GlobalData> = Default::default();
static ref GLOBAL_DATA: Pin<Box<Mutex<GlobalData>>> = Pin::new(Box::default());
}
static mut GLOBAL_DATA_PTR: *mut Mutex<GlobalData> = std::ptr::null_mut();

Expand Down

0 comments on commit 6162144

Please sign in to comment.