diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-24 10:30:27 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-24 10:30:27 +0000 |
commit | d7ccb8027b1c4d409fa30c61d7edc8d7e39c72c8 (patch) | |
tree | 5e9fbbb4e40e311fd7bf3c7abf0402e46fcbdc6d /os/hal/osal | |
parent | 55bce34bfa45c162d82c0f648bfc5fef36b41be3 (diff) | |
download | ChibiOS-d7ccb8027b1c4d409fa30c61d7edc8d7e39c72c8.tar.gz ChibiOS-d7ccb8027b1c4d409fa30c61d7edc8d7e39c72c8.tar.bz2 ChibiOS-d7ccb8027b1c4d409fa30c61d7edc8d7e39c72c8.zip |
Some OSAL rework.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7802 35acf78f-673a-0410-8e92-d51de3d6d3f4
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.
*
|