Skip to content

Commit 975cbda

Browse files
committed
Flip zend_jit_startup_failed -> zend_jit_startup_ok
1 parent 59dda86 commit 975cbda

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3278,12 +3278,13 @@ static zend_result accel_post_startup(void)
32783278
|| zend_jit_startup(ZSMMG(reserved), jit_size, reattached) != SUCCESS) {
32793279
JIT_G(enabled) = false;
32803280
JIT_G(on) = false;
3281-
zend_jit_startup_failed = true;
32823281
/* The JIT is implicitly disabled with opcache.jit_buffer_size=0, so we don't want to
32833282
* emit a warning here. */
32843283
if (JIT_G(buffer_size) != 0) {
32853284
zend_accel_error(ACCEL_LOG_WARNING, "Could not enable JIT!");
32863285
}
3286+
} else {
3287+
zend_jit_startup_ok = true;
32873288
}
32883289
}
32893290
#endif

ext/opcache/jit/zend_jit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ typedef struct _zend_jit_stub {
103103
#define JIT_STUB(name, offset, adjustment) \
104104
{JIT_STUB_PREFIX #name, zend_jit_ ## name ## _stub, offset, adjustment}
105105

106-
bool zend_jit_startup_failed = false;
106+
bool zend_jit_startup_ok = false;
107107

108108
zend_ulong zend_jit_profile_counter = 0;
109109
int zend_jit_profile_counter_rid = -1;
@@ -5099,7 +5099,7 @@ static void zend_jit_reset_counters(void)
50995099
ZEND_EXT_API void zend_jit_activate(void)
51005100
{
51015101
#ifdef ZTS
5102-
if (zend_jit_startup_failed) {
5102+
if (!zend_jit_startup_ok) {
51035103
JIT_G(enabled) = 0;
51045104
JIT_G(on) = 0;
51055105
return;

ext/opcache/jit/zend_jit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ typedef struct _zend_jit_trace_rec zend_jit_trace_rec;
9191
typedef struct _zend_jit_trace_stack_frame zend_jit_trace_stack_frame;
9292
typedef struct _sym_node zend_sym_node;
9393

94-
extern bool zend_jit_startup_failed;
94+
extern bool zend_jit_startup_ok;
9595

9696
typedef struct _zend_jit_globals {
9797
bool enabled;

0 commit comments

Comments
 (0)