FreeRTOS Improvements #82

Closed
muellerr wants to merge 24 commits from KSat:mueller_FreeRTOS_improvements into master
Owner

fixes #55

I might split the semaphore parts which can be used by all OSes, for now everything is in this branch though.

Some details:

SemaphoreFactory (All OSes):

  • Similar to mutex factory, but for semaphores (counting and binary)
  • Every OS provides their own implementation. I liked the interface of the
    semaphores from FreeRTOS, so the interface to return a Semaphore instance is similar
  • The factory can return a counting or a binary semaphore.

SemaphoreIF (All OSes):

  • First simple interface, like MutexIF, but for semaphores.

MessageQueue:

  • Implemented to isDefaultDestinationSet function
  • Core function call can now send from ISR, provided that the CallContext member is set appropriately. It also performs the context switch by using the TaskManagement helper.

BinarySemaphore:

  • Implemented a wrapper for the BinarySemaphore. Also implemented the move ctor and move assignment operators

CoutingSemaphore:

  • The only changes are in the CTORs, so I implemented from the BinarySemaphore and provided own constructors.

TaskManagement:

  • Context switch call from ISR unimplemented, is architecture dependant and defined as external function. For every new FreeRTOS project, this function has to be implemented, similarly to the printChar() method.

There should not be any API changes: the default call context of a message queue is stil the task context, so everything should work as before.

fixes #55 I might split the semaphore parts which can be used by all OSes, for now everything is in this branch though. Some details: **SemaphoreFactory (All OSes)**: - Similar to mutex factory, but for semaphores (counting and binary) - Every OS provides their own implementation. I liked the interface of the semaphores from FreeRTOS, so the interface to return a Semaphore instance is similar - The factory can return a counting or a binary semaphore. **SemaphoreIF (All OSes)**: - First simple interface, like MutexIF, but for semaphores. **MessageQueue**: - Implemented to isDefaultDestinationSet function - Core function call can now send from ISR, provided that the CallContext member is set appropriately. It also performs the context switch by using the TaskManagement helper. **BinarySemaphore**: - Implemented a wrapper for the BinarySemaphore. Also implemented the move ctor and move assignment operators **CoutingSemaphore**: - The only changes are in the CTORs, so I implemented from the BinarySemaphore and provided own constructors. **TaskManagement**: - Context switch call from ISR unimplemented, is architecture dependant and defined as external function. For every new FreeRTOS project, this function has to be implemented, similarly to the printChar() method. There should not be any API changes: the default call context of a message queue is stil the task context, so everything should work as before.
muellerr added the
feature
label 2020-05-18 18:13:28 +02:00
muellerr changed title from mueller_FreeRTOS_improvements to FreeRTOS Improvements 2020-05-20 12:41:44 +02:00
Author
Owner

Binary and Counting Semaphores were tested for FreeRTOS and are working. I think there is an incosistency between FreeRTOS and Linux: NO_TIMEOUT does not have the same meaning..

Binary and Counting Semaphores were tested for FreeRTOS and are working. I think there is an incosistency between FreeRTOS and Linux: NO_TIMEOUT does not have the same meaning..
Author
Owner

I will split this up. I wrote Semaphore implementations for FreeRTOS which use the new task notifications, but I'd like to keep those separate because they are bound to the task (because they use the tasks' notification value).

I also adapted the factory interface a bit, additional parameters can be passed too (required to create different kind of semaphores).

I will split this up. I wrote Semaphore implementations for FreeRTOS which use the new task notifications, but I'd like to keep those separate because they are bound to the task (because they use the tasks' notification value). I also adapted the factory interface a bit, additional parameters can be passed too (required to create different kind of semaphores).
muellerr closed this pull request 2020-06-04 20:10:41 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.