Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37858354
en ru br
ALT Linux repos
S:8.2.10-alt1

Group :: Development/Other
RPM: php8.2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: php-8.1-e2k.patch
Download


diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c
index 92ae9b88..a947768c 100644
--- a/Zend/zend_fibers.c
+++ b/Zend/zend_fibers.c
@@ -328,7 +328,13 @@ ZEND_API bool zend_fiber_init_context(zend_fiber_context *context, void *kind, z
 	handle->uc_stack.ss_flags = 0;
 	handle->uc_link = NULL;
 
+#ifdef __e2k__
+	if (UNEXPECTED(makecontext_e2k(handle, (void (*)(void)) zend_fiber_trampoline, 0) < 0)) {
+		return false;
+	}
+#else
 	makecontext(handle, (void (*)(void)) zend_fiber_trampoline, 0);
+#endif
 
 	context->handle = handle;
 #else
@@ -354,6 +360,10 @@ ZEND_API void zend_fiber_destroy_context(zend_fiber_context *context)
 {
 	zend_observer_fiber_destroy_notify(context);
 
+#ifdef __e2k__
+	freecontext_e2k(&context->stack->ucontext);
+#endif
+
 	zend_fiber_stack_free(context->stack);
 }
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin