bin semaph sif replacements

This commit is contained in:
Robin Müller 2020-05-18 17:48:16 +02:00
parent ec8538b442
commit b237287315
2 changed files with 7 additions and 6 deletions

View File

@ -11,8 +11,7 @@
BinarySemaphore::BinarySemaphore() { BinarySemaphore::BinarySemaphore() {
handle = xSemaphoreCreateBinary(); handle = xSemaphoreCreateBinary();
if(handle == nullptr) { if(handle == nullptr) {
sif::error << "Binary semaphore creation failure" << std::endl;
error << "Binary semaphore creation failure" << std::endl;
} }
xSemaphoreGive(handle); xSemaphoreGive(handle);
} }
@ -26,7 +25,7 @@ BinarySemaphore::~BinarySemaphore() {
BinarySemaphore::BinarySemaphore(const BinarySemaphore& other) { BinarySemaphore::BinarySemaphore(const BinarySemaphore& other) {
handle = xSemaphoreCreateBinary(); handle = xSemaphoreCreateBinary();
if(handle == nullptr) { if(handle == nullptr) {
error << "Binary semaphore creation failure" << std::endl; sif::error << "Binary semaphore creation failure" << std::endl;
} }
xSemaphoreGive(handle); xSemaphoreGive(handle);
} }
@ -35,7 +34,7 @@ BinarySemaphore& BinarySemaphore::operator =(const BinarySemaphore& s) {
if(this != &s) { if(this != &s) {
handle = xSemaphoreCreateBinary(); handle = xSemaphoreCreateBinary();
if(handle == nullptr) { if(handle == nullptr) {
error << "Binary semaphore creation failure" << std::endl; sif::error << "Binary semaphore creation failure" << std::endl;
} }
xSemaphoreGive(handle); xSemaphoreGive(handle);
} }
@ -45,7 +44,7 @@ BinarySemaphore& BinarySemaphore::operator =(const BinarySemaphore& s) {
BinarySemaphore::BinarySemaphore(BinarySemaphore&& s) { BinarySemaphore::BinarySemaphore(BinarySemaphore&& s) {
handle = xSemaphoreCreateBinary(); handle = xSemaphoreCreateBinary();
if(handle == nullptr) { if(handle == nullptr) {
error << "Binary semaphore creation failure" << std::endl; sif::error << "Binary semaphore creation failure" << std::endl;
} }
xSemaphoreGive(handle); xSemaphoreGive(handle);
} }
@ -55,7 +54,7 @@ BinarySemaphore& BinarySemaphore::operator =(
if(&s != this) { if(&s != this) {
handle = xSemaphoreCreateBinary(); handle = xSemaphoreCreateBinary();
if(handle == nullptr) { if(handle == nullptr) {
error << "Binary semaphore creation failure" << std::endl; sif::error << "Binary semaphore creation failure" << std::endl;
} }
xSemaphoreGive(handle); xSemaphoreGive(handle);
} }

View File

@ -24,6 +24,7 @@ enum {
MEMORY_HELPER, //MH MEMORY_HELPER, //MH
SERIALIZE_IF, //SE SERIALIZE_IF, //SE
FIXED_MAP, //FM FIXED_MAP, //FM
FIXED_MULTIMAP, //FMM
HAS_HEALTH_IF, //HHI HAS_HEALTH_IF, //HHI
FIFO_CLASS, //FF FIFO_CLASS, //FF
MESSAGE_PROXY, //MQP MESSAGE_PROXY, //MQP
@ -59,6 +60,7 @@ enum {
SGP4PROPAGATOR_CLASS, //SGP4 53 SGP4PROPAGATOR_CLASS, //SGP4 53
MUTEX_IF, //MUX 54 MUTEX_IF, //MUX 54
MESSAGE_QUEUE_IF,//MQI 55 MESSAGE_QUEUE_IF,//MQI 55
SEMAPHORE_IF, //SPH 56
FW_CLASS_ID_COUNT //is actually count + 1 ! FW_CLASS_ID_COUNT //is actually count + 1 !
}; };