aboutsummaryrefslogtreecommitdiffstats
path: root/os/nil/include/nil.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-21 10:34:52 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-21 10:34:52 +0000
commit1fc5d692e6473c03b817186ce7e7720634b632f3 (patch)
treeff61c2eb2bb619006e83cc2fbde6baa32cfb430d /os/nil/include/nil.h
parent034fe7b30f6a73c403b7f36812a1e7086cc8332c (diff)
downloadChibiOS-1fc5d692e6473c03b817186ce7e7720634b632f3.tar.gz
ChibiOS-1fc5d692e6473c03b817186ce7e7720634b632f3.tar.bz2
ChibiOS-1fc5d692e6473c03b817186ce7e7720634b632f3.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7047 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil/include/nil.h')
-rw-r--r--os/nil/include/nil.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h
index 6c3084153..7de756b31 100644
--- a/os/nil/include/nil.h
+++ b/os/nil/include/nil.h
@@ -189,6 +189,40 @@ typedef struct nil_thread thread_t;
#define NIL_CFG_THREAD_EXT_FIELDS
#endif
+/**
+ * @brief Threads initialization hook.
+ */
+#if !defined(NIL_CFG_THREAD_EXT_INIT_HOOK) || defined(__DOXYGEN__)
+#define NIL_CFG_THREAD_EXT_INIT_HOOK(tr) {}
+#endif
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+#if !defined(NIL_CFG_IDLE_ENTER_HOOK) || defined(__DOXYGEN__)
+#define NIL_CFG_IDLE_ENTER_HOOK() {}
+#endif
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+#if !defined(NIL_CFG_IDLE_LEAVE_HOOK) || defined(__DOXYGEN__)
+#define NIL_CFG_IDLE_LEAVE_HOOK() {}
+#endif
+
+/**
+ * @brief System halt hook.
+ */
+#if !defined(NIL_CFG_SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
+#define NIL_CFG_SYSTEM_HALT_HOOK(reason) {}
+#endif
+
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/