Skip to content

Commit

Permalink
Merge commit 'b30f9d74d6a0' from llvm.org/main into next
Browse files Browse the repository at this point in the history
  • Loading branch information
git apple-llvm automerger committed Jan 9, 2025
2 parents 7f44cc5 + b30f9d7 commit bec77fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libc/src/__support/threads/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ class ThreadAtExitCallbackMgr {

int add_callback(AtExitCallback *callback, void *obj) {
cpp::lock_guard lock(mtx);
return callback_list.push_back({callback, obj});
if (callback_list.push_back({callback, obj}))
return 0;
return -1;
}

void call() {
Expand Down

0 comments on commit bec77fc

Please sign in to comment.