From fffc9453bc37c4e5de45442e972fd801c93f7725 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Thu, 21 Sep 2023 19:21:29 +0100 Subject: [PATCH] remotealloc: make can_dequeue match its tin The introduction of the remote stub back in https://github.com/microsoft/snmalloc/pull/604 renamed this function from `is_empty` but did not flip the return value to match. Do so now. --- src/snmalloc/mem/corealloc.h | 2 +- src/snmalloc/mem/remoteallocator.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snmalloc/mem/corealloc.h b/src/snmalloc/mem/corealloc.h index e2a99f2c..61fe5805 100644 --- a/src/snmalloc/mem/corealloc.h +++ b/src/snmalloc/mem/corealloc.h @@ -462,7 +462,7 @@ namespace snmalloc } }; - return !(message_queue().can_dequeue(domesticate)); + return message_queue().can_dequeue(domesticate); } /** diff --git a/src/snmalloc/mem/remoteallocator.h b/src/snmalloc/mem/remoteallocator.h index 2d15e6d1..e3c45bc1 100644 --- a/src/snmalloc/mem/remoteallocator.h +++ b/src/snmalloc/mem/remoteallocator.h @@ -91,7 +91,7 @@ namespace snmalloc inline bool can_dequeue(Domesticator_head domesticate_head) { return domesticate_head(front.load()) - ->atomic_read_next(key_global, domesticate_head) == nullptr; + ->atomic_read_next(key_global, domesticate_head) != nullptr; } /**