integrated queue map manager bugfixes
This commit is contained in:
parent
376617f9f9
commit
3c4289335e
@ -39,7 +39,8 @@ private:
|
||||
QueueMapManager();
|
||||
~QueueMapManager();
|
||||
|
||||
uint32_t queueCounter = 0;
|
||||
// Start at 1 because 0 might be the NO_QUEUE value
|
||||
uint32_t queueCounter = 1;
|
||||
MutexIF* mapLock;
|
||||
QueueMap queueMap;
|
||||
static QueueMapManager* mqManagerInstance;
|
||||
|
@ -17,7 +17,11 @@ QueueMapManager* QueueMapManager::instance() {
|
||||
|
||||
ReturnValue_t QueueMapManager::addMessageQueue(QueueHandle_t queue, MessageQueueId_t* id) {
|
||||
MutexGuard lock(mapLock);
|
||||
uint32_t currentId = ++queueCounter;
|
||||
uint32_t currentId = queueCounter++;
|
||||
if(currentId == MessageQueueIF::NO_QUEUE) {
|
||||
// Skip the NO_QUEUE value
|
||||
currentId = queueCounter++;
|
||||
}
|
||||
auto returnPair = queueMap.emplace(currentId, queue);
|
||||
if(not returnPair.second) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
|
Loading…
Reference in New Issue
Block a user