git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1224 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2009-10-17 07:35:31 +00:00
parent 0c0d93a91e
commit d61cb88dab
2 changed files with 12 additions and 6 deletions

View File

@ -419,7 +419,9 @@
#define THREAD_EXT_FIELDS \ #define THREAD_EXT_FIELDS \
struct { \ struct { \
/* Add threads custom fields here.*/ \ /* Add threads custom fields here.*/ \
/* The thread termination \p EventSource.*/ \ EventSource p_exitesource; \}; /* The thread termination \p EventSource.*/ \
EventSource p_exitesource; \
};
#endif #endif
/** /**
@ -432,7 +434,8 @@ struct { \
#if !defined(THREAD_EXT_INIT) || defined(__DOXYGEN__) #if !defined(THREAD_EXT_INIT) || defined(__DOXYGEN__)
#define THREAD_EXT_INIT(tp) { \ #define THREAD_EXT_INIT(tp) { \
/* Add threads initialization code here.*/ \ /* Add threads initialization code here.*/ \
chEvtInit(&tp->p_exitesource); \} chEvtInit(&tp->p_exitesource); \
}
#endif #endif
/** /**
@ -446,7 +449,8 @@ struct { \
#if !defined(THREAD_EXT_EXIT) || defined(__DOXYGEN__) #if !defined(THREAD_EXT_EXIT) || defined(__DOXYGEN__)
#define THREAD_EXT_EXIT(tp) { \ #define THREAD_EXT_EXIT(tp) { \
/* Add threads finalization code here.*/ \ /* Add threads finalization code here.*/ \
chEvtBroadcastI(&currp->p_exitesource); \} chEvtBroadcastI(&currp->p_exitesource); \
}
#endif #endif
/** /**
@ -459,6 +463,8 @@ struct { \
} }
#endif #endif
#define chThdGetExitEventSource(tp) (&(tp)->p_exitesource)#endif /* _CHCONF_H_ */ #define chThdGetExitEventSource(tp) (&(tp)->p_exitesource)
#endif /* _CHCONF_H_ */
/** @} */ /** @} */

View File

@ -32,7 +32,7 @@
extern align_t __heap_base__; extern align_t __heap_base__;
extern align_t __heap_end__; extern align_t __heap_end__;
#else #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 #endif
static align_t *nextmem; static align_t *nextmem;
@ -49,7 +49,7 @@ void core_init(void) {
endmem = &__heap_end__; endmem = &__heap_end__;
#else #else
nextmem = &buffer[0]; 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 #endif
} }