Page 1 of 1

OSAL creating threads

Posted: Thu Dec 13, 2018 10:03 pm
by faisal
It seems that an important part of the OSAL API is missing ... creating threads. It seems obvious to be there - so I ask, is there a reason it's not as of 18.2.x?

Re: OSAL creating threads

Posted: Thu Dec 13, 2018 10:12 pm
by Giovanni
Hi,

The main reason is that the OSAL API is not meant to be a full RTOS abstraction, it should be just the minimum required to allow HAL to interface an RTOS. In that perspective threads creation is not necessary, my feeling is that the current OSAL is already too fat for its intended role.

Giovanni

Re: OSAL creating threads

Posted: Thu Dec 13, 2018 10:59 pm
by faisal
I think creating a thread is pretty foundational. I can imagine drivers which require a thread (in the past the USB driver required a thread ..).

I was looking towards using OSAL as an OS abstraction - not necessarily as fully featured as ChibiOS/RT, but at least the basic API to which I can write application and library code against. That way, I can compile the same code for simulation on a PC host, as well as for an embedded target - which is a big benefit of using an OSAL.

Re: OSAL creating threads

Posted: Thu Dec 13, 2018 11:03 pm
by faisal
I have more OSAL comments in light of your opinion that it is 'bloated'. I'm putting those comments in a more appropriate thread:
viewtopic.php?f=3&t=4165