Skip to content

Commit 3418be1

Browse files
Revert changes to pycore_code.h
1 parent 401b6da commit 3418be1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Include/internal/pycore_code.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,16 +466,21 @@ write_location_entry_start(uint8_t *ptr, int code, int length)
466466
# error "Cold exit value should be larger than adaptive cooldown value"
467467
#endif
468468

469+
static inline _Py_BackoffCounter
470+
adaptive_counter_bits(uint16_t value, uint16_t backoff) {
471+
return make_backoff_counter(value, backoff);
472+
}
473+
469474
static inline _Py_BackoffCounter
470475
adaptive_counter_warmup(void) {
471-
return make_backoff_counter(ADAPTIVE_WARMUP_VALUE,
472-
ADAPTIVE_WARMUP_BACKOFF);
476+
return adaptive_counter_bits(ADAPTIVE_WARMUP_VALUE,
477+
ADAPTIVE_WARMUP_BACKOFF);
473478
}
474479

475480
static inline _Py_BackoffCounter
476481
adaptive_counter_cooldown(void) {
477-
return make_backoff_counter(ADAPTIVE_COOLDOWN_VALUE,
478-
ADAPTIVE_COOLDOWN_BACKOFF);
482+
return adaptive_counter_bits(ADAPTIVE_COOLDOWN_VALUE,
483+
ADAPTIVE_COOLDOWN_BACKOFF);
479484
}
480485

481486
static inline _Py_BackoffCounter

0 commit comments

Comments
 (0)