Группа :: Система/Основа
Пакет: openssl1.1
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: openssl-alt-e2k-makecontext.patch
Скачать
Скачать
diff --git a/openssl/crypto/async/arch/async_posix.c b/openssl/crypto/async/arch/async_posix.c
index 95678d4f..edf7441f 100644
--- a/openssl/crypto/async/arch/async_posix.c
+++ b/openssl/crypto/async/arch/async_posix.c
@@ -40,8 +40,17 @@ int async_fibre_makecontext(async_fibre *fibre)
if (fibre->fibre.uc_stack.ss_sp != NULL) {
fibre->fibre.uc_stack.ss_size = STACKSIZE;
fibre->fibre.uc_link = NULL;
+#ifndef __e2k__
makecontext(&fibre->fibre, async_start_func, 0);
return 1;
+#else
+ if (makecontext_e2k(&fibre->fibre, async_start_func, 0) == 0)
+ return 1;
+ else {
+ OPENSSL_free(fibre->fibre.uc_stack.ss_sp);
+ fibre->fibre.uc_stack.ss_sp = NULL;
+ }
+#endif
}
} else {
fibre->fibre.uc_stack.ss_sp = NULL;
@@ -51,6 +60,9 @@ int async_fibre_makecontext(async_fibre *fibre)
void async_fibre_free(async_fibre *fibre)
{
+#ifdef __e2k__
+ freecontext_e2k(&fibre->fibre);
+#endif
OPENSSL_free(fibre->fibre.uc_stack.ss_sp);
fibre->fibre.uc_stack.ss_sp = NULL;
}