Working Area allocation bug in NIL fixed.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7061 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2014-07-23 12:33:02 +00:00
parent 46d8d011af
commit 37de072555
2 changed files with 4 additions and 3 deletions

View File

@ -407,7 +407,8 @@ typedef struct {
* @brief Entry of user threads table * @brief Entry of user threads table
*/ */
#define THD_TABLE_ENTRY(wap, name, funcp, arg) \ #define THD_TABLE_ENTRY(wap, name, funcp, arg) \
{wap, (wap) + sizeof (wap), name, funcp, arg}, {wap, ((stkalign_t *)(wap)) + (sizeof (wap) / sizeof(stkalign_t)), \
name, funcp, arg},
/** /**
* @brief End of user threads table. * @brief End of user threads table.
@ -441,7 +442,7 @@ typedef struct {
* @api * @api
*/ */
#define THD_WORKING_AREA_SIZE(n) \ #define THD_WORKING_AREA_SIZE(n) \
THD_ALIGN_STACK_SIZE(sizeof(thread_t) + PORT_WA_SIZE(n)) THD_ALIGN_STACK_SIZE(PORT_WA_SIZE(n))
/** /**
* @brief Static working area allocation. * @brief Static working area allocation.

View File

@ -92,7 +92,7 @@
* area size. * area size.
*/ */
#if !defined(PORT_INT_REQUIRED_STACK) || defined(__DOXYGEN__) #if !defined(PORT_INT_REQUIRED_STACK) || defined(__DOXYGEN__)
#define PORT_INT_REQUIRED_STACK 32 #define PORT_INT_REQUIRED_STACK 256
#endif #endif
/** /**