diff options
Diffstat (limited to 'os/hal/osal')
-rw-r--r-- | os/hal/osal/nil/osal.h | 20 | ||||
-rw-r--r-- | os/hal/osal/rt/osal.h | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/os/hal/osal/nil/osal.h b/os/hal/osal/nil/osal.h index 2273a4789..0c3541efd 100644 --- a/os/hal/osal/nil/osal.h +++ b/os/hal/osal/nil/osal.h @@ -421,6 +421,26 @@ static inline void osalSysHalt(const char *reason) { }
/**
+ * @brief Disables interrupts globally.
+ *
+ * @special
+ */
+static inline void osalSysDisable(void) {
+
+ chSysDisable();
+}
+
+/**
+ * @brief Enables interrupts globally.
+ *
+ * @special
+ */
+static inline void osalSysEnable(void) {
+
+ chSysEnable();
+}
+
+/**
* @brief Enters a critical zone from thread context.
* @note This function cannot be used for reentrant critical zones.
*
diff --git a/os/hal/osal/rt/osal.h b/os/hal/osal/rt/osal.h index 5fa3ab5cf..e48b1b2a5 100644 --- a/os/hal/osal/rt/osal.h +++ b/os/hal/osal/rt/osal.h @@ -412,6 +412,26 @@ static inline void osalSysHalt(const char *reason) { }
/**
+ * @brief Disables interrupts globally.
+ *
+ * @special
+ */
+static inline void osalSysDisable(void) {
+
+ chSysDisable();
+}
+
+/**
+ * @brief Enables interrupts globally.
+ *
+ * @special
+ */
+static inline void osalSysEnable(void) {
+
+ chSysEnable();
+}
+
+/**
* @brief Enters a critical zone from thread context.
* @note This function cannot be used for reentrant critical zones.
*
|