diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-07-23 12:33:02 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-07-23 12:33:02 +0000 |
commit | 37de072555e10227bafa83dd3f14d1cf0341d7c9 (patch) | |
tree | 27242162e58f680ff462edb6ac463cc217b29fb5 /os/nil/include | |
parent | 46d8d011afb9669404c0295ae0846261b8355859 (diff) | |
download | ChibiOS-37de072555e10227bafa83dd3f14d1cf0341d7c9.tar.gz ChibiOS-37de072555e10227bafa83dd3f14d1cf0341d7c9.tar.bz2 ChibiOS-37de072555e10227bafa83dd3f14d1cf0341d7c9.zip |
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
Diffstat (limited to 'os/nil/include')
-rw-r--r-- | os/nil/include/nil.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h index 7de756b31..d6a7945d7 100644 --- a/os/nil/include/nil.h +++ b/os/nil/include/nil.h @@ -407,7 +407,8 @@ typedef struct { * @brief Entry of user threads table
*/
#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.
@@ -441,7 +442,7 @@ typedef struct { * @api
*/
#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.
|