1
0
forked from fsfw/fsfw

all cstdout uses wrapped in preprocessor defines

This commit is contained in:
2021-01-03 13:58:18 +01:00
parent 61fc6cac97
commit c19e628d79
96 changed files with 715 additions and 14 deletions

View File

@ -5,7 +5,9 @@
BinarySemaphore::BinarySemaphore() {
handle = xSemaphoreCreateBinary();
if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "Semaphore: Binary semaph creation failure" << std::endl;
#endif
}
// Initiated semaphore must be given before it can be taken.
xSemaphoreGive(handle);
@ -18,7 +20,9 @@ BinarySemaphore::~BinarySemaphore() {
BinarySemaphore::BinarySemaphore(BinarySemaphore&& s) {
handle = xSemaphoreCreateBinary();
if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "Binary semaphore creation failure" << std::endl;
#endif
}
xSemaphoreGive(handle);
}
@ -28,7 +32,9 @@ BinarySemaphore& BinarySemaphore::operator =(
if(&s != this) {
handle = xSemaphoreCreateBinary();
if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "Binary semaphore creation failure" << std::endl;
#endif
}
xSemaphoreGive(handle);
}