diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-08-21 08:38:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-08-21 08:38:14 +0000 |
commit | 138c0f900d823b2c953038048bc40b14610f958a (patch) | |
tree | 6c446a2ec08cba09ac2345dbb9b708139e3e1c85 /demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h | |
parent | 29226ecec7052b72ba82e8ba2eedb4c91d27ff28 (diff) | |
download | ChibiOS-138c0f900d823b2c953038048bc40b14610f958a.tar.gz ChibiOS-138c0f900d823b2c953038048bc40b14610f958a.tar.bz2 ChibiOS-138c0f900d823b2c953038048bc40b14610f958a.zip |
Added new kernel hooks (on halt and on systick).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2136 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h')
-rw-r--r-- | demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h b/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h index 6522e0b3b..8f2c4b3e3 100644 --- a/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h @@ -434,11 +434,9 @@ * @brief Threads descriptor structure hook.
* @details User fields added to the end of the @p Thread structure.
*/
-#if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__)
-#define THREAD_EXT_FIELDS \
-struct { \
- /* Add threads custom fields here.*/ \
-};
+#if !defined(THREAD_EXT_FIELDS_HOOK) || defined(__DOXYGEN__)
+#define THREAD_EXT_FIELDS_HOOK \
+ /* Add threads custom fields here.*/
#endif
/**
@@ -448,9 +446,9 @@ struct { \ * @note It is invoked from within @p chThdInit() and implicitily from all
* the threads creation APIs.
*/
-#if !defined(THREAD_EXT_INIT) || defined(__DOXYGEN__)
-#define THREAD_EXT_INIT(tp) { \
- /* Add threads initialization code here.*/ \
+#if !defined(THREAD_EXT_INIT_HOOK) || defined(__DOXYGEN__)
+#define THREAD_EXT_INIT_HOOK(tp) { \
+ /* Add threads initialization code here.*/ \
}
#endif
@@ -462,9 +460,9 @@ struct { \ * @note It is also invoked when the threads simply return in order to
* terminate.
*/
-#if !defined(THREAD_EXT_EXIT) || defined(__DOXYGEN__)
-#define THREAD_EXT_EXIT(tp) { \
- /* Add threads finalization code here.*/ \
+#if !defined(THREAD_EXT_EXIT_HOOK) || defined(__DOXYGEN__)
+#define THREAD_EXT_EXIT_HOOK(tp) { \
+ /* Add threads finalization code here.*/ \
}
#endif
@@ -473,8 +471,30 @@ struct { \ * @details This hook is continuously invoked by the idle thread loop.
*/
#if !defined(IDLE_LOOP_HOOK) || defined(__DOXYGEN__)
-#define IDLE_LOOP_HOOK() { \
- /* Idle loop code here.*/ \
+#define IDLE_LOOP_HOOK() { \
+ /* Idle loop code here.*/ \
+}
+#endif
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+#if !defined(SYSTEM_TICK_EVENT_HOOK) || defined(__DOXYGEN__)
+#define SYSTEM_TICK_EVENT_HOOK() { \
+ /* System tick event code here.*/ \
+}
+#endif
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+#if !defined(SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
+#define SYSTEM_HALT_HOOK() { \
+ /* System halt code here.*/ \
}
#endif
|