diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-12-14 12:53:58 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-12-14 12:53:58 +0000 |
commit | f673ed8ff2cea38590120e2820e5aeac246fb00f (patch) | |
tree | 502bc49db56d0084ee7aa3aebf7ea4eace5a2df0 /os/rt | |
parent | b191398a784564f24b56ab9ab75785b7f8cd33e0 (diff) | |
download | ChibiOS-f673ed8ff2cea38590120e2820e5aeac246fb00f.tar.gz ChibiOS-f673ed8ff2cea38590120e2820e5aeac246fb00f.tar.bz2 ChibiOS-f673ed8ff2cea38590120e2820e5aeac246fb00f.zip |
Fixed bug #909.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11142 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt')
-rw-r--r-- | os/rt/src/chthreads.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c index fcd6aefe3..db9939c74 100644 --- a/os/rt/src/chthreads.c +++ b/os/rt/src/chthreads.c @@ -280,7 +280,8 @@ thread_t *chThdCreateI(const thread_descriptor_t *tdp) { thread_t *chThdCreate(const thread_descriptor_t *tdp) {
thread_t *tp;
-#if CH_CFG_USE_REGISTRY == TRUE
+#if (CH_CFG_USE_REGISTRY == TRUE) && \
+ (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
chDbgAssert(chRegFindThreadByWorkingArea(tdp->wbase) == NULL,
"working area in use");
#endif
@@ -329,7 +330,8 @@ thread_t *chThdCreateStatic(void *wsp, size_t size, MEM_IS_ALIGNED(size, PORT_STACK_ALIGN) &&
(prio <= HIGHPRIO) && (pf != NULL));
-#if CH_CFG_USE_REGISTRY == TRUE
+#if (CH_CFG_USE_REGISTRY == TRUE) && \
+ (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
chDbgAssert(chRegFindThreadByWorkingArea(wsp) == NULL,
"working area in use");
#endif
|