aboutsummaryrefslogtreecommitdiffstats
path: root/demos/Posix-GCC
diff options
context:
space:
mode:
Diffstat (limited to 'demos/Posix-GCC')
-rw-r--r--demos/Posix-GCC/chconf.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/demos/Posix-GCC/chconf.h b/demos/Posix-GCC/chconf.h
index 4572090b0..fa22f7210 100644
--- a/demos/Posix-GCC/chconf.h
+++ b/demos/Posix-GCC/chconf.h
@@ -483,6 +483,16 @@
#endif
/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__)
+#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \
+ /* System halt code here.*/ \
+}
+#endif
+
+/**
* @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop.
*/
@@ -503,6 +513,7 @@
}
#endif
+
/**
* @brief System halt hook.
* @details This hook is invoked in case to a system halting error before