redefine mi_likely/mi_unlikely to work with C++ 20 [[likely]] attributes

This commit is contained in:
Daan Leijen 2022-04-19 19:50:06 -07:00
parent d69d4c861f
commit 7bc602ebb4
12 changed files with 67 additions and 64 deletions

View file

@ -930,8 +930,8 @@ static mi_segment_t* mi_abandoned_pop(void) {
// Check efficiently if it is empty (or if the visited list needs to be moved)
mi_tagged_segment_t ts = mi_atomic_load_relaxed(&abandoned);
segment = mi_tagged_segment_ptr(ts);
if (mi_likely(segment == NULL)) {
if (mi_likely(!mi_abandoned_visited_revisit())) { // try to swap in the visited list on NULL
if mi_likely(segment == NULL) {
if mi_likely(!mi_abandoned_visited_revisit()) { // try to swap in the visited list on NULL
return NULL;
}
}