Skip to content

Commit

Permalink
Add helper method to cancel VM interrupt (#260)
Browse files Browse the repository at this point in the history
Follow up to #257
  • Loading branch information
joehoyle authored Jul 19, 2023
1 parent 42ef04a commit acd3369
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/zend/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@ impl ExecutorGlobals {
}
}
}

/// Cancel a requested an interrupt of the PHP VM.
pub fn cancel_interrupt(&mut self) {
cfg_if::cfg_if! {
if #[cfg(php82)] {
unsafe {
zend_atomic_bool_store(&mut self.vm_interrupt, false);
}
} else {
self.vm_interrupt = true;
}
}
}
}

/// Executor globals rwlock.
Expand Down

0 comments on commit acd3369

Please sign in to comment.