Skip to content

Commit

Permalink
remotealloc: make can_dequeue match its tin
Browse files Browse the repository at this point in the history
The introduction of the remote stub back in
#604 renamed this function from
`is_empty` but did not flip the return value to match.  Do so now.
  • Loading branch information
nwf-msr committed Jan 5, 2024
1 parent f3e470c commit fffc945
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/snmalloc/mem/corealloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ namespace snmalloc
}
};

return !(message_queue().can_dequeue(domesticate));
return message_queue().can_dequeue(domesticate);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/snmalloc/mem/remoteallocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit fffc945

Please sign in to comment.