diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index fda335bc7..cef71f8c5 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -419,7 +419,9 @@ #define THREAD_EXT_FIELDS \ struct { \ /* Add threads custom fields here.*/ \ - /* The thread termination \p EventSource.*/ \ EventSource p_exitesource; \}; + /* The thread termination \p EventSource.*/ \ + EventSource p_exitesource; \ +}; #endif /** @@ -432,7 +434,8 @@ struct { \ #if !defined(THREAD_EXT_INIT) || defined(__DOXYGEN__) #define THREAD_EXT_INIT(tp) { \ /* Add threads initialization code here.*/ \ - chEvtInit(&tp->p_exitesource); \} + chEvtInit(&tp->p_exitesource); \ +} #endif /** @@ -446,7 +449,8 @@ struct { \ #if !defined(THREAD_EXT_EXIT) || defined(__DOXYGEN__) #define THREAD_EXT_EXIT(tp) { \ /* Add threads finalization code here.*/ \ - chEvtBroadcastI(&currp->p_exitesource); \} + chEvtBroadcastI(&currp->p_exitesource); \ +} #endif /** @@ -459,6 +463,8 @@ struct { \ } #endif -#define chThdGetExitEventSource(tp) (&(tp)->p_exitesource)#endif /* _CHCONF_H_ */ +#define chThdGetExitEventSource(tp) (&(tp)->p_exitesource) + +#endif /* _CHCONF_H_ */ /** @} */ diff --git a/os/kernel/src/chmemcore.c b/os/kernel/src/chmemcore.c index 87ef6037a..4efc63e52 100644 --- a/os/kernel/src/chmemcore.c +++ b/os/kernel/src/chmemcore.c @@ -32,7 +32,7 @@ extern align_t __heap_base__; extern align_t __heap_end__; #else -align_t buffer[ALIGN_SIZE(CH_MEMCORE_SIZE) / sizeof(align_t)]; +align_t buffer[MEM_ALIGN_SIZE(CH_MEMCORE_SIZE) / sizeof(align_t)]; #endif static align_t *nextmem; @@ -49,7 +49,7 @@ void core_init(void) { endmem = &__heap_end__; #else nextmem = &buffer[0]; - endmem = &buffer[ALIGN_SIZE(CH_MEMCORE_SIZE) / sizeof(align_t)]; + endmem = &buffer[MEM_ALIGN_SIZE(CH_MEMCORE_SIZE) / sizeof(align_t)]; #endif }