From d7ccb8027b1c4d409fa30c61d7edc8d7e39c72c8 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 24 Mar 2015 10:30:27 +0000 Subject: Some OSAL rework. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7802 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/osal/nil/osal.h | 20 ++++++++++++++++++++ os/hal/osal/rt/osal.h | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) (limited to 'os/hal/osal') 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 @@ -420,6 +420,26 @@ static inline void osalSysHalt(const char *reason) { chSysHalt(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 @@ -411,6 +411,26 @@ static inline void osalSysHalt(const char *reason) { chSysHalt(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. -- cgit v1.2.3