[RFC] HAL-OSAL rework
Posted: Tue Mar 03, 2026 10:19 am
Hi,
How high would you rate modifying the OSAL to make HAL porting to other RTOSes a real possibility?
Currently the OSAL is very close to the RT own patterns, for example:
Going to sleep atomically inside a critical section is something that most (all) other RTOSes cannot do, there are also other similar patterns. Because of this current OSAL is very hard to port correctly to other RTOSes.
Making a different OSAL and reworking HAL would be a huge effort, wondering if it is something worth doing.
Alternatively, instead of modifying HAL/OSAL (huge legacy and effort) it could be targeted to the experimental XHAL currently in trunk which is much more a work-in-progress.
BTW not considering this out of pure generosity
it would enable 1:1 comparisons between RT/NIL and other solutions using the same HAL/setup.
Giovanni
How high would you rate modifying the OSAL to make HAL porting to other RTOSes a real possibility?
Currently the OSAL is very close to the RT own patterns, for example:
Code: Select all
osalSysLock();
if (!condition) {
osalThreadSuspendS();
}
osalSysUnlock();
Making a different OSAL and reworking HAL would be a huge effort, wondering if it is something worth doing.
Alternatively, instead of modifying HAL/OSAL (huge legacy and effort) it could be targeted to the experimental XHAL currently in trunk which is much more a work-in-progress.
BTW not considering this out of pure generosity
Giovanni