Merge branch 'mueller_framework' into front_branch
This commit is contained in:
@ -57,6 +57,10 @@ ReturnValue_t FixedTimeslotTask::startTask() {
|
||||
|
||||
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
||||
uint32_t slotTimeMs, int8_t executionStep) {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> mueller_framework
|
||||
if (objectManager->get<ExecutableObjectIF>(componentId) != nullptr) {
|
||||
if(slotTimeMs == 0) {
|
||||
// FreeRTOS throws a sanity error for zero values, so we set
|
||||
|
@ -120,16 +120,16 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
||||
message->setSender(sentFrom);
|
||||
BaseType_t result;
|
||||
if(callContext == CallContext::task) {
|
||||
result = xQueueSendToBack(reinterpret_cast<void*>(sendTo),
|
||||
reinterpret_cast<const void*>(message->getBuffer()), 0);
|
||||
result = xQueueSendToBack(reinterpret_cast<QueueHandle_t>(sendTo),
|
||||
static_cast<const void*>(message->getBuffer()), 0);
|
||||
}
|
||||
else {
|
||||
// If the call context is from an interrupt,
|
||||
// request a context switch if a higher priority task
|
||||
// was blocked by the interrupt.
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
result = xQueueSendFromISR(reinterpret_cast<void*>(sendTo),
|
||||
reinterpret_cast<const void*>(message->getBuffer()),
|
||||
result = xQueueSendFromISR(reinterpret_cast<QueueHandle_t>(sendTo),
|
||||
static_cast<const void*>(message->getBuffer()),
|
||||
&xHigherPriorityTaskWoken);
|
||||
if(xHigherPriorityTaskWoken == pdTRUE) {
|
||||
TaskManagement::requestContextSwitch(callContext);
|
||||
|
@ -6,8 +6,11 @@
|
||||
#include <framework/ipc/MessageQueueMessage.h>
|
||||
#include <framework/osal/FreeRTOS/TaskManagement.h>
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include "queue.h"
|
||||
extern "C" {
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/queue.h>
|
||||
}
|
||||
|
||||
|
||||
|
||||
//TODO this class assumes that MessageQueueId_t is the same size as void* (the FreeRTOS handle type), compiler will catch this but it might be nice to have something checking or even an always working solution
|
||||
|
@ -3,9 +3,11 @@
|
||||
|
||||
#include <framework/ipc/MutexIF.h>
|
||||
|
||||
extern "C" {
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/semphr.h>
|
||||
}
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include "semphr.h"
|
||||
|
||||
/**
|
||||
* @brief OS component to implement MUTual EXclusion
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include <framework/returnvalues/HasReturnvaluesIF.h>
|
||||
|
||||
extern "C" {
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
}
|
||||
#include <cstdint>
|
||||
|
||||
|
Reference in New Issue
Block a user