Improved OSLIB initialization.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12826 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2019-06-04 14:16:40 +00:00
parent 964a3c1b4e
commit f06a43a7ea
4 changed files with 27 additions and 24 deletions

View File

@ -274,24 +274,12 @@ void chDbgCheckClassS(void) {
void chSysInit(void) {
const thread_config_t *tcp;
/* Optional library modules.*/
_oslib_init();
/* Architecture layer initialization.*/
port_init();
/* Memory core initialization, if enabled.*/
#if CH_CFG_USE_MEMCORE == TRUE
_core_init();
#endif
/* Heap initialization, if enabled.*/
#if CH_CFG_USE_HEAP == TRUE
_heap_init();
#endif
/* Factory initialization, if enabled.*/
#if CH_CFG_USE_FACTORY == TRUE
_factory_init();
#endif
/* System initialization hook.*/
CH_CFG_SYSTEM_INIT_HOOK();

View File

@ -212,6 +212,28 @@
#include "chpipes.h"
#include "chfactory.h"
/*===========================================================================*/
/* Module inline functions. */
/*===========================================================================*/
/**
* @brief Initialization of all library modules.
*
* @notapi
*/
static inline void _oslib_init(void) {
#if CH_CFG_USE_MEMCORE == TRUE
_core_init();
#endif
#if CH_CFG_USE_HEAP == TRUE
_heap_init();
#endif
#if CH_CFG_USE_FACTORY == TRUE
_factory_init();
#endif
}
#endif /* CHLIB_H */
/** @} */

View File

@ -102,6 +102,7 @@ void chSysInit(void) {
_scheduler_init();
_vt_init();
_trace_init();
_oslib_init();
#if CH_DBG_SYSTEM_STATE_CHECK == TRUE
ch.dbg.isr_cnt = (cnt_t)0;
@ -110,15 +111,6 @@ void chSysInit(void) {
#if CH_CFG_USE_TM == TRUE
_tm_init();
#endif
#if CH_CFG_USE_MEMCORE == TRUE
_core_init();
#endif
#if CH_CFG_USE_HEAP == TRUE
_heap_init();
#endif
#if CH_CFG_USE_FACTORY == TRUE
_factory_init();
#endif
#if CH_DBG_STATISTICS == TRUE
_stats_init();
#endif

View File

@ -74,6 +74,7 @@
*****************************************************************************
*** Next ***
- LIB: Improved OSLIB initialization.
- NEW: Lots of style fixes thanks to the new tool.
- NEW: Code style checker tool added.
- NEW: Added and embedded flash driver model in HAL. Added an implementation