Skip to content
Permalink
Browse files

Improved OSLIB initialization.

git-svn-id: http://svn.osdn.net/svnroot/chibios/trunk@12826 839915b6-73f9-46d8-aad0-56b2323169cb
  • Loading branch information...
gdisirio authored and nfbot committed Jun 4, 2019
1 parent 5cc3b4d commit ea4cdd1ae27dcfb70ab350f89a6ab0865efd7a4f
Showing with 27 additions and 24 deletions.
  1. +3 −15 os/nil/src/ch.c
  2. +22 −0 os/oslib/include/chlib.h
  3. +1 −9 os/rt/src/chsys.c
  4. +1 −0 readme.txt
@@ -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();

@@ -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 */

/** @} */
@@ -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
@@ -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

0 comments on commit ea4cdd1

Please sign in to comment.
You can’t perform that action at this time.