OSAL creating threads

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
faisal
Posts: 382
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 45 times
Been thanked: 62 times

OSAL creating threads

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: OSAL creating threads

Post 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
faisal
Posts: 382
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 45 times
Been thanked: 62 times

Re: OSAL creating threads

Post 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.
faisal
Posts: 382
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 45 times
Been thanked: 62 times

Re: OSAL creating threads

Post 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
Post Reply