aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/include
diff options
context:
space:
mode:
Diffstat (limited to 'os/rt/include')
-rw-r--r--os/rt/include/chschd.h10
-rw-r--r--os/rt/include/chthreads.h11
2 files changed, 14 insertions, 7 deletions
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h
index aa49adcff..a00b2fa5a 100644
--- a/os/rt/include/chschd.h
+++ b/os/rt/include/chschd.h
@@ -169,11 +169,15 @@ struct ch_thread {
*/
const char *name;
#endif
+#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE) || \
+ defined(__DOXYGEN__)
/**
- * @brief Thread stack boundary.
- * @note This pointer matches with the working area base address.
+ * @brief Working area base address.
+ * @note This pointer is used for stack overflow checks and for
+ * dynamic threading.
*/
- stkalign_t *stklimit;
+ stkalign_t *wabase;
+#endif
/**
* @brief Current thread state.
*/
diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h
index 47d7c2672..1b29260ed 100644
--- a/os/rt/include/chthreads.h
+++ b/os/rt/include/chthreads.h
@@ -307,18 +307,21 @@ static inline systime_t chThdGetTicksX(thread_t *tp) {
}
#endif
+#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE) || \
+ defined(__DOXYGEN__)
/**
- * @brief Returns the stack limit of the specified thread.
+ * @brief Returns the working area base of the specified thread.
*
* @param[in] tp pointer to the thread
- * @return The stack limit pointer.
+ * @return The working area base pointer.
*
* @xclass
*/
-static inline stkalign_t *chthdGetStackLimitX(thread_t *tp) {
+static inline stkalign_t *chThdGetWorkingAreaX(thread_t *tp) {
- return tp->stklimit;
+ return tp->wabase;
}
+#endif /* CH_DBG_ENABLE_STACK_CHECK == TRUE */
/**
* @brief Verifies if the specified thread is in the @p CH_STATE_FINAL state.