mbed library sources. Supersedes mbed-src.

Dependents:   BREAK_SENSOR_LED

Fork of mbed-dev by mbed official

Revision:
167:e84263d55307
Parent:
160:d5399cc887bb
Child:
178:79309dc6340a
diff -r c97ed07ec1a8 -r e84263d55307 platform/mbed_critical.h
--- a/platform/mbed_critical.h	Thu Jun 08 15:02:37 2017 +0100
+++ b/platform/mbed_critical.h	Wed Jun 21 17:46:44 2017 +0100
@@ -33,7 +33,7 @@
 /** Determine the current interrupts enabled state
   *
   * This function can be called to determine whether or not interrupts are currently enabled.
-  * \note
+  * @note
   * NOTE:
   * This function works for both cortex-A and cortex-M, although the underlyng implementation
   * differs.
@@ -41,10 +41,21 @@
   */
 bool core_util_are_interrupts_enabled(void);
 
+/** Determine if this code is executing from an interrupt
+  *
+  * This function can be called to determine if the code is running on interrupt context.
+  * @note
+  * NOTE:
+  * This function works for both cortex-A and cortex-M, although the underlyng implementation
+  * differs.
+  * @return true if in an isr, false otherwise
+  */
+bool core_util_is_isr_active(void);
+
 /** Mark the start of a critical section
   *
   * This function should be called to mark the start of a critical section of code.
-  * \note
+  * @note
   * NOTES:
   * 1) The use of this style of critical section is targetted at C based implementations.
   * 2) These critical sections can be nested.
@@ -57,7 +68,7 @@
 /** Mark the end of a critical section
   *
   * This function should be called to mark the end of a critical section of code.
-  * \note
+  * @note
   * NOTES:
   * 1) The use of this style of critical section is targetted at C based implementations.
   * 2) These critical sections can be nested.
@@ -82,7 +93,7 @@
  * @param[in,out] expectedCurrentValue A pointer to some location holding the
  *                              expected current value of the data being set atomically.
  *                              The computed 'desiredValue' should be a function of this current value.
- *                              @Note: This is an in-out parameter. In the
+ *                              @note: This is an in-out parameter. In the
  *                              failure case of atomic_cas (where the
  *                              destination isn't set), the pointee of expectedCurrentValue is
  *                              updated with the current value.
@@ -105,7 +116,7 @@
  *     return true
  * }
  *
- * @Note: In the failure case (where the destination isn't set), the value
+ * @note: In the failure case (where the destination isn't set), the value
  * pointed to by expectedCurrentValue is still updated with the current value.
  * This property helps writing concise code for the following incr:
  *
@@ -135,7 +146,7 @@
  * @param[in,out] expectedCurrentValue A pointer to some location holding the
  *                              expected current value of the data being set atomically.
  *                              The computed 'desiredValue' should be a function of this current value.
- *                              @Note: This is an in-out parameter. In the
+ *                              @note: This is an in-out parameter. In the
  *                              failure case of atomic_cas (where the
  *                              destination isn't set), the pointee of expectedCurrentValue is
  *                              updated with the current value.
@@ -158,7 +169,7 @@
  *     return true
  * }
  *
- * @Note: In the failure case (where the destination isn't set), the value
+ * @note: In the failure case (where the destination isn't set), the value
  * pointed to by expectedCurrentValue is still updated with the current value.
  * This property helps writing concise code for the following incr:
  *
@@ -188,7 +199,7 @@
  * @param[in,out] expectedCurrentValue A pointer to some location holding the
  *                              expected current value of the data being set atomically.
  *                              The computed 'desiredValue' should be a function of this current value.
- *                              @Note: This is an in-out parameter. In the
+ *                              @note: This is an in-out parameter. In the
  *                              failure case of atomic_cas (where the
  *                              destination isn't set), the pointee of expectedCurrentValue is
  *                              updated with the current value.
@@ -211,7 +222,7 @@
  *     return true
  * }
  *
- * @Note: In the failure case (where the destination isn't set), the value
+ * @note: In the failure case (where the destination isn't set), the value
  * pointed to by expectedCurrentValue is still updated with the current value.
  * This property helps writing concise code for the following incr:
  *
@@ -241,7 +252,7 @@
  * @param[in,out] expectedCurrentValue A pointer to some location holding the
  *                              expected current value of the data being set atomically.
  *                              The computed 'desiredValue' should be a function of this current value.
- *                              @Note: This is an in-out parameter. In the
+ *                              @note: This is an in-out parameter. In the
  *                              failure case of atomic_cas (where the
  *                              destination isn't set), the pointee of expectedCurrentValue is
  *                              updated with the current value.
@@ -264,7 +275,7 @@
  *     return true
  * }
  *
- * @Note: In the failure case (where the destination isn't set), the value
+ * @note: In the failure case (where the destination isn't set), the value
  * pointed to by expectedCurrentValue is still updated with the current value.
  * This property helps writing concise code for the following incr:
  *