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

@ -43,8 +43,10 @@ ReturnValue_t BinarySemaphore::acquire(TimeoutType timeoutType,
timeOut.tv_nsec = nseconds - timeOut.tv_sec * 1000000000;
result = sem_timedwait(&handle, &timeOut);
if(result != 0 and errno == EINVAL) {
#if CPP_OSTREAM_ENABLED == 1
sif::debug << "BinarySemaphore::acquire: Invalid time value possible"
<< std::endl;
#endif
}
}
if(result == 0) {
@ -62,8 +64,10 @@ ReturnValue_t BinarySemaphore::acquire(TimeoutType timeoutType,
return SemaphoreIF::SEMAPHORE_INVALID;
case(EINTR):
// Call was interrupted by signal handler
#if CPP_OSTREAM_ENABLED == 1
sif::debug << "BinarySemaphore::acquire: Signal handler interrupted."
"Code " << strerror(errno) << std::endl;
#endif
/* No break */
default:
return HasReturnvaluesIF::RETURN_FAILED;
@ -126,8 +130,10 @@ void BinarySemaphore::initSemaphore(uint8_t initCount) {
// Value exceeds SEM_VALUE_MAX
case(ENOSYS):
// System does not support process-shared semaphores
#if CPP_OSTREAM_ENABLED == 1
sif::error << "BinarySemaphore: Init failed with" << strerror(errno)
<< std::endl;
#endif
}
}
}