Skip to content

Commit b63dbe1

Browse files
authored
Magic way to avoid JIT being disabled (swoole#4029)
1 parent 709813f commit b63dbe1

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

ext-src/php_swoole.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,7 @@ PHP_RINIT_FUNCTION(swoole) {
10001000
SIGG(check) = 0;
10011001
#endif
10021002

1003+
php_swoole_coroutine_rinit();
10031004
php_swoole_runtime_rinit();
10041005

10051006
SWOOLE_G(req_status) = PHP_SWOOLE_RINIT_END;

ext-src/php_swoole.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ void php_swoole_redis_server_minit(int module_number);
252252
* RINIT
253253
* ==============================================================
254254
*/
255+
void php_swoole_coroutine_rinit();
255256
void php_swoole_runtime_rinit();
256257

257258
/**

ext-src/swoole_coroutine.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,9 @@ void php_swoole_coroutine_minit(int module_number) {
877877

878878
SW_REGISTER_LONG_CONSTANT("SWOOLE_EXIT_IN_COROUTINE", SW_EXIT_IN_COROUTINE);
879879
SW_REGISTER_LONG_CONSTANT("SWOOLE_EXIT_IN_SERVER", SW_EXIT_IN_SERVER);
880+
}
880881

882+
void php_swoole_coroutine_rinit() {
881883
if (SWOOLE_G(cli)) {
882884
ori_exit_handler = zend_get_user_opcode_handler(ZEND_EXIT);
883885
zend_set_user_opcode_handler(ZEND_EXIT, coro_exit_handler);

0 commit comments

Comments
 (0)