Skip to content

Commit

Permalink
Do not ASSERT when notifying StubConditionVariable (#3088)
Browse files Browse the repository at this point in the history
  • Loading branch information
celskeggs authored Dec 20, 2024
1 parent b920379 commit 231cfdb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Os/Stub/ConditionVariable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ namespace Stub {
namespace Mutex {

void StubConditionVariable::wait(Os::Mutex& mutex) {
// This stub implementation can only be used in deployments that never need to wait on any ConditionVariable.
// Trigger an assertion if anyone ever tries to wait.
FW_ASSERT(0);
}
void StubConditionVariable::notify() {
FW_ASSERT(0);
// Nobody is waiting, because we assert if anyone tries to wait.
// Therefore, we can notify all waiters by doing nothing.
}
void StubConditionVariable::notifyAll() {
FW_ASSERT(0);
// Nobody is waiting, because we assert if anyone tries to wait.
// Therefore, we can notify all waiters by doing nothing.
}

ConditionVariableHandle* StubConditionVariable::getHandle() {
Expand Down

0 comments on commit 231cfdb

Please sign in to comment.