Skip to content
Snippets Groups Projects
Commit 7772404b authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'cps-assert-fix' into 'master'

[CountingPrivateSemaphore] Fix assert

See merge request !200
parents b8e2983f 1f461b2d
No related branches found
No related tags found
1 merge request!200[CountingPrivateSemaphore] Fix assert
Pipeline #62683 passed
// SPDX-License-Identifier: LGPL-3.0-or-later
// Copyright © 2020 Florian Schmaus
// Copyright © 2020-2021 Florian Schmaus
#include "CountingPrivateSemaphore.hpp"
#include <cassert> // for assert
......@@ -46,7 +46,7 @@ auto CountingPrivateSemaphore::signalInternal() -> Context* {
// returns nullptr. In this case the block() function will
// have won the race.
Context* context = blockedContext.exchange(nullptr);
assert(context > (Context*)4096);
assert(!context || context > (Context*)4096);
return context;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment