I am wondering if i can use a semaphore and mutex with Linux OS programmed in C++ with the API semaphore.h.
I am not yet in code development/writing phase but the goal is to have a readout on a receiver which sends out asynchronous binary data at a baud rate of 115,200. Then this data must be relayed into a modem as fast as possible.
I was thinking about using perhaps a RTOS but I have no knowledge about bootloaders and how to get Linux or any other OS on a chip or embedded environment.
Would it be possible to write these read and write functions in a separate thread interconnected by signals and pipes, with the addition of semaphore's?
The semaphores could be required when I have to format the received data in another format, parse only the required strings, or have to modify them mathematically. Before sending them out.
Is it possible to receive the benefits of semaphores when using a non-RTOS? I have only seen these being applied in cooperation with RTOS's.