Skip to content

Commit acd3369

Browse files
authored
Add helper method to cancel VM interrupt (#260)
Follow up to #257
1 parent 42ef04a commit acd3369

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/zend/globals.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ impl ExecutorGlobals {
8686
}
8787
}
8888
}
89+
90+
/// Cancel a requested an interrupt of the PHP VM.
91+
pub fn cancel_interrupt(&mut self) {
92+
cfg_if::cfg_if! {
93+
if #[cfg(php82)] {
94+
unsafe {
95+
zend_atomic_bool_store(&mut self.vm_interrupt, false);
96+
}
97+
} else {
98+
self.vm_interrupt = true;
99+
}
100+
}
101+
}
89102
}
90103

91104
/// Executor globals rwlock.

0 commit comments

Comments
 (0)