mbed-os

Fork of mbed-os by erkin yucel

Committer:
xuaner
Date:
Thu Jul 20 14:26:57 2017 +0000
Revision:
1:3deb71413561
Parent:
0:f269e3021894
mbed_os

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elessair 0:f269e3021894 1
elessair 0:f269e3021894 2 /** \addtogroup platform */
elessair 0:f269e3021894 3 /** @{*/
elessair 0:f269e3021894 4 /*
elessair 0:f269e3021894 5 * Copyright (c) 2015-2016, ARM Limited, All Rights Reserved
elessair 0:f269e3021894 6 * SPDX-License-Identifier: Apache-2.0
elessair 0:f269e3021894 7 *
elessair 0:f269e3021894 8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
elessair 0:f269e3021894 9 * not use this file except in compliance with the License.
elessair 0:f269e3021894 10 * You may obtain a copy of the License at
elessair 0:f269e3021894 11 *
elessair 0:f269e3021894 12 * http://www.apache.org/licenses/LICENSE-2.0
elessair 0:f269e3021894 13 *
elessair 0:f269e3021894 14 * Unless required by applicable law or agreed to in writing, software
elessair 0:f269e3021894 15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
elessair 0:f269e3021894 16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
elessair 0:f269e3021894 17 * See the License for the specific language governing permissions and
elessair 0:f269e3021894 18 * limitations under the License.
elessair 0:f269e3021894 19 */
elessair 0:f269e3021894 20
elessair 0:f269e3021894 21 #ifndef __MBED_UTIL_CRITICAL_H__
elessair 0:f269e3021894 22 #define __MBED_UTIL_CRITICAL_H__
elessair 0:f269e3021894 23
elessair 0:f269e3021894 24 #include <stdbool.h>
elessair 0:f269e3021894 25 #include <stdint.h>
elessair 0:f269e3021894 26 #include <stddef.h>
elessair 0:f269e3021894 27
elessair 0:f269e3021894 28 #ifdef __cplusplus
elessair 0:f269e3021894 29 extern "C" {
elessair 0:f269e3021894 30 #endif
elessair 0:f269e3021894 31
elessair 0:f269e3021894 32
elessair 0:f269e3021894 33 /** Determine the current interrupts enabled state
elessair 0:f269e3021894 34 *
elessair 0:f269e3021894 35 * This function can be called to determine whether or not interrupts are currently enabled.
elessair 0:f269e3021894 36 * \note
elessair 0:f269e3021894 37 * NOTE:
elessair 0:f269e3021894 38 * This function works for both cortex-A and cortex-M, although the underlyng implementation
elessair 0:f269e3021894 39 * differs.
elessair 0:f269e3021894 40 * @return true if interrupts are enabled, false otherwise
elessair 0:f269e3021894 41 */
elessair 0:f269e3021894 42 bool core_util_are_interrupts_enabled(void);
elessair 0:f269e3021894 43
elessair 0:f269e3021894 44 /** Mark the start of a critical section
elessair 0:f269e3021894 45 *
elessair 0:f269e3021894 46 * This function should be called to mark the start of a critical section of code.
elessair 0:f269e3021894 47 * \note
elessair 0:f269e3021894 48 * NOTES:
elessair 0:f269e3021894 49 * 1) The use of this style of critical section is targetted at C based implementations.
elessair 0:f269e3021894 50 * 2) These critical sections can be nested.
elessair 0:f269e3021894 51 * 3) The interrupt enable state on entry to the first critical section (of a nested set, or single
elessair 0:f269e3021894 52 * section) will be preserved on exit from the section.
elessair 0:f269e3021894 53 * 4) This implementation will currently only work on code running in privileged mode.
elessair 0:f269e3021894 54 */
elessair 0:f269e3021894 55 void core_util_critical_section_enter(void);
elessair 0:f269e3021894 56
elessair 0:f269e3021894 57 /** Mark the end of a critical section
elessair 0:f269e3021894 58 *
elessair 0:f269e3021894 59 * This function should be called to mark the end of a critical section of code.
elessair 0:f269e3021894 60 * \note
elessair 0:f269e3021894 61 * NOTES:
elessair 0:f269e3021894 62 * 1) The use of this style of critical section is targetted at C based implementations.
elessair 0:f269e3021894 63 * 2) These critical sections can be nested.
elessair 0:f269e3021894 64 * 3) The interrupt enable state on entry to the first critical section (of a nested set, or single
elessair 0:f269e3021894 65 * section) will be preserved on exit from the section.
elessair 0:f269e3021894 66 * 4) This implementation will currently only work on code running in privileged mode.
elessair 0:f269e3021894 67 */
elessair 0:f269e3021894 68 void core_util_critical_section_exit(void);
elessair 0:f269e3021894 69
elessair 0:f269e3021894 70 /**
elessair 0:f269e3021894 71 * Atomic compare and set. It compares the contents of a memory location to a
elessair 0:f269e3021894 72 * given value and, only if they are the same, modifies the contents of that
elessair 0:f269e3021894 73 * memory location to a given new value. This is done as a single atomic
elessair 0:f269e3021894 74 * operation. The atomicity guarantees that the new value is calculated based on
elessair 0:f269e3021894 75 * up-to-date information; if the value had been updated by another thread in
elessair 0:f269e3021894 76 * the meantime, the write would fail due to a mismatched expectedCurrentValue.
elessair 0:f269e3021894 77 *
elessair 0:f269e3021894 78 * Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect
elessair 0:f269e3021894 79 * you to the article on compare-and swap].
elessair 0:f269e3021894 80 *
elessair 0:f269e3021894 81 * @param ptr The target memory location.
elessair 0:f269e3021894 82 * @param[in,out] expectedCurrentValue A pointer to some location holding the
elessair 0:f269e3021894 83 * expected current value of the data being set atomically.
elessair 0:f269e3021894 84 * The computed 'desiredValue' should be a function of this current value.
elessair 0:f269e3021894 85 * @Note: This is an in-out parameter. In the
elessair 0:f269e3021894 86 * failure case of atomic_cas (where the
elessair 0:f269e3021894 87 * destination isn't set), the pointee of expectedCurrentValue is
elessair 0:f269e3021894 88 * updated with the current value.
elessair 0:f269e3021894 89 * @param[in] desiredValue The new value computed based on '*expectedCurrentValue'.
elessair 0:f269e3021894 90 *
elessair 0:f269e3021894 91 * @return true if the memory location was atomically
elessair 0:f269e3021894 92 * updated with the desired value (after verifying
elessair 0:f269e3021894 93 * that it contained the expectedCurrentValue),
elessair 0:f269e3021894 94 * false otherwise. In the failure case,
elessair 0:f269e3021894 95 * exepctedCurrentValue is updated with the new
elessair 0:f269e3021894 96 * value of the target memory location.
elessair 0:f269e3021894 97 *
elessair 0:f269e3021894 98 * pseudocode:
elessair 0:f269e3021894 99 * function cas(p : pointer to int, old : pointer to int, new : int) returns bool {
elessair 0:f269e3021894 100 * if *p != *old {
elessair 0:f269e3021894 101 * *old = *p
elessair 0:f269e3021894 102 * return false
elessair 0:f269e3021894 103 * }
elessair 0:f269e3021894 104 * *p = new
elessair 0:f269e3021894 105 * return true
elessair 0:f269e3021894 106 * }
elessair 0:f269e3021894 107 *
elessair 0:f269e3021894 108 * @Note: In the failure case (where the destination isn't set), the value
elessair 0:f269e3021894 109 * pointed to by expectedCurrentValue is still updated with the current value.
elessair 0:f269e3021894 110 * This property helps writing concise code for the following incr:
elessair 0:f269e3021894 111 *
elessair 0:f269e3021894 112 * function incr(p : pointer to int, a : int) returns int {
elessair 0:f269e3021894 113 * done = false
elessair 0:f269e3021894 114 * value = *p // This fetch operation need not be atomic.
elessair 0:f269e3021894 115 * while not done {
elessair 0:f269e3021894 116 * done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success
elessair 0:f269e3021894 117 * }
elessair 0:f269e3021894 118 * return value + a
elessair 0:f269e3021894 119 * }
elessair 0:f269e3021894 120 */
elessair 0:f269e3021894 121 bool core_util_atomic_cas_u8(uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_t desiredValue);
elessair 0:f269e3021894 122
elessair 0:f269e3021894 123 /**
elessair 0:f269e3021894 124 * Atomic compare and set. It compares the contents of a memory location to a
elessair 0:f269e3021894 125 * given value and, only if they are the same, modifies the contents of that
elessair 0:f269e3021894 126 * memory location to a given new value. This is done as a single atomic
elessair 0:f269e3021894 127 * operation. The atomicity guarantees that the new value is calculated based on
elessair 0:f269e3021894 128 * up-to-date information; if the value had been updated by another thread in
elessair 0:f269e3021894 129 * the meantime, the write would fail due to a mismatched expectedCurrentValue.
elessair 0:f269e3021894 130 *
elessair 0:f269e3021894 131 * Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect
elessair 0:f269e3021894 132 * you to the article on compare-and swap].
elessair 0:f269e3021894 133 *
elessair 0:f269e3021894 134 * @param ptr The target memory location.
elessair 0:f269e3021894 135 * @param[in,out] expectedCurrentValue A pointer to some location holding the
elessair 0:f269e3021894 136 * expected current value of the data being set atomically.
elessair 0:f269e3021894 137 * The computed 'desiredValue' should be a function of this current value.
elessair 0:f269e3021894 138 * @Note: This is an in-out parameter. In the
elessair 0:f269e3021894 139 * failure case of atomic_cas (where the
elessair 0:f269e3021894 140 * destination isn't set), the pointee of expectedCurrentValue is
elessair 0:f269e3021894 141 * updated with the current value.
elessair 0:f269e3021894 142 * @param[in] desiredValue The new value computed based on '*expectedCurrentValue'.
elessair 0:f269e3021894 143 *
elessair 0:f269e3021894 144 * @return true if the memory location was atomically
elessair 0:f269e3021894 145 * updated with the desired value (after verifying
elessair 0:f269e3021894 146 * that it contained the expectedCurrentValue),
elessair 0:f269e3021894 147 * false otherwise. In the failure case,
elessair 0:f269e3021894 148 * exepctedCurrentValue is updated with the new
elessair 0:f269e3021894 149 * value of the target memory location.
elessair 0:f269e3021894 150 *
elessair 0:f269e3021894 151 * pseudocode:
elessair 0:f269e3021894 152 * function cas(p : pointer to int, old : pointer to int, new : int) returns bool {
elessair 0:f269e3021894 153 * if *p != *old {
elessair 0:f269e3021894 154 * *old = *p
elessair 0:f269e3021894 155 * return false
elessair 0:f269e3021894 156 * }
elessair 0:f269e3021894 157 * *p = new
elessair 0:f269e3021894 158 * return true
elessair 0:f269e3021894 159 * }
elessair 0:f269e3021894 160 *
elessair 0:f269e3021894 161 * @Note: In the failure case (where the destination isn't set), the value
elessair 0:f269e3021894 162 * pointed to by expectedCurrentValue is still updated with the current value.
elessair 0:f269e3021894 163 * This property helps writing concise code for the following incr:
elessair 0:f269e3021894 164 *
elessair 0:f269e3021894 165 * function incr(p : pointer to int, a : int) returns int {
elessair 0:f269e3021894 166 * done = false
elessair 0:f269e3021894 167 * value = *p // This fetch operation need not be atomic.
elessair 0:f269e3021894 168 * while not done {
elessair 0:f269e3021894 169 * done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success
elessair 0:f269e3021894 170 * }
elessair 0:f269e3021894 171 * return value + a
elessair 0:f269e3021894 172 * }
elessair 0:f269e3021894 173 */
elessair 0:f269e3021894 174 bool core_util_atomic_cas_u16(uint16_t *ptr, uint16_t *expectedCurrentValue, uint16_t desiredValue);
elessair 0:f269e3021894 175
elessair 0:f269e3021894 176 /**
elessair 0:f269e3021894 177 * Atomic compare and set. It compares the contents of a memory location to a
elessair 0:f269e3021894 178 * given value and, only if they are the same, modifies the contents of that
elessair 0:f269e3021894 179 * memory location to a given new value. This is done as a single atomic
elessair 0:f269e3021894 180 * operation. The atomicity guarantees that the new value is calculated based on
elessair 0:f269e3021894 181 * up-to-date information; if the value had been updated by another thread in
elessair 0:f269e3021894 182 * the meantime, the write would fail due to a mismatched expectedCurrentValue.
elessair 0:f269e3021894 183 *
elessair 0:f269e3021894 184 * Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect
elessair 0:f269e3021894 185 * you to the article on compare-and swap].
elessair 0:f269e3021894 186 *
elessair 0:f269e3021894 187 * @param ptr The target memory location.
elessair 0:f269e3021894 188 * @param[in,out] expectedCurrentValue A pointer to some location holding the
elessair 0:f269e3021894 189 * expected current value of the data being set atomically.
elessair 0:f269e3021894 190 * The computed 'desiredValue' should be a function of this current value.
elessair 0:f269e3021894 191 * @Note: This is an in-out parameter. In the
elessair 0:f269e3021894 192 * failure case of atomic_cas (where the
elessair 0:f269e3021894 193 * destination isn't set), the pointee of expectedCurrentValue is
elessair 0:f269e3021894 194 * updated with the current value.
elessair 0:f269e3021894 195 * @param[in] desiredValue The new value computed based on '*expectedCurrentValue'.
elessair 0:f269e3021894 196 *
elessair 0:f269e3021894 197 * @return true if the memory location was atomically
elessair 0:f269e3021894 198 * updated with the desired value (after verifying
elessair 0:f269e3021894 199 * that it contained the expectedCurrentValue),
elessair 0:f269e3021894 200 * false otherwise. In the failure case,
elessair 0:f269e3021894 201 * exepctedCurrentValue is updated with the new
elessair 0:f269e3021894 202 * value of the target memory location.
elessair 0:f269e3021894 203 *
elessair 0:f269e3021894 204 * pseudocode:
elessair 0:f269e3021894 205 * function cas(p : pointer to int, old : pointer to int, new : int) returns bool {
elessair 0:f269e3021894 206 * if *p != *old {
elessair 0:f269e3021894 207 * *old = *p
elessair 0:f269e3021894 208 * return false
elessair 0:f269e3021894 209 * }
elessair 0:f269e3021894 210 * *p = new
elessair 0:f269e3021894 211 * return true
elessair 0:f269e3021894 212 * }
elessair 0:f269e3021894 213 *
elessair 0:f269e3021894 214 * @Note: In the failure case (where the destination isn't set), the value
elessair 0:f269e3021894 215 * pointed to by expectedCurrentValue is still updated with the current value.
elessair 0:f269e3021894 216 * This property helps writing concise code for the following incr:
elessair 0:f269e3021894 217 *
elessair 0:f269e3021894 218 * function incr(p : pointer to int, a : int) returns int {
elessair 0:f269e3021894 219 * done = false
elessair 0:f269e3021894 220 * value = *p // This fetch operation need not be atomic.
elessair 0:f269e3021894 221 * while not done {
elessair 0:f269e3021894 222 * done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success
elessair 0:f269e3021894 223 * }
elessair 0:f269e3021894 224 * return value + a
elessair 0:f269e3021894 225 * }
elessair 0:f269e3021894 226 */
elessair 0:f269e3021894 227 bool core_util_atomic_cas_u32(uint32_t *ptr, uint32_t *expectedCurrentValue, uint32_t desiredValue);
elessair 0:f269e3021894 228
elessair 0:f269e3021894 229 /**
elessair 0:f269e3021894 230 * Atomic compare and set. It compares the contents of a memory location to a
elessair 0:f269e3021894 231 * given value and, only if they are the same, modifies the contents of that
elessair 0:f269e3021894 232 * memory location to a given new value. This is done as a single atomic
elessair 0:f269e3021894 233 * operation. The atomicity guarantees that the new value is calculated based on
elessair 0:f269e3021894 234 * up-to-date information; if the value had been updated by another thread in
elessair 0:f269e3021894 235 * the meantime, the write would fail due to a mismatched expectedCurrentValue.
elessair 0:f269e3021894 236 *
elessair 0:f269e3021894 237 * Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect
elessair 0:f269e3021894 238 * you to the article on compare-and swap].
elessair 0:f269e3021894 239 *
elessair 0:f269e3021894 240 * @param ptr The target memory location.
elessair 0:f269e3021894 241 * @param[in,out] expectedCurrentValue A pointer to some location holding the
elessair 0:f269e3021894 242 * expected current value of the data being set atomically.
elessair 0:f269e3021894 243 * The computed 'desiredValue' should be a function of this current value.
elessair 0:f269e3021894 244 * @Note: This is an in-out parameter. In the
elessair 0:f269e3021894 245 * failure case of atomic_cas (where the
elessair 0:f269e3021894 246 * destination isn't set), the pointee of expectedCurrentValue is
elessair 0:f269e3021894 247 * updated with the current value.
elessair 0:f269e3021894 248 * @param[in] desiredValue The new value computed based on '*expectedCurrentValue'.
elessair 0:f269e3021894 249 *
elessair 0:f269e3021894 250 * @return true if the memory location was atomically
elessair 0:f269e3021894 251 * updated with the desired value (after verifying
elessair 0:f269e3021894 252 * that it contained the expectedCurrentValue),
elessair 0:f269e3021894 253 * false otherwise. In the failure case,
elessair 0:f269e3021894 254 * exepctedCurrentValue is updated with the new
elessair 0:f269e3021894 255 * value of the target memory location.
elessair 0:f269e3021894 256 *
elessair 0:f269e3021894 257 * pseudocode:
elessair 0:f269e3021894 258 * function cas(p : pointer to int, old : pointer to int, new : int) returns bool {
elessair 0:f269e3021894 259 * if *p != *old {
elessair 0:f269e3021894 260 * *old = *p
elessair 0:f269e3021894 261 * return false
elessair 0:f269e3021894 262 * }
elessair 0:f269e3021894 263 * *p = new
elessair 0:f269e3021894 264 * return true
elessair 0:f269e3021894 265 * }
elessair 0:f269e3021894 266 *
elessair 0:f269e3021894 267 * @Note: In the failure case (where the destination isn't set), the value
elessair 0:f269e3021894 268 * pointed to by expectedCurrentValue is still updated with the current value.
elessair 0:f269e3021894 269 * This property helps writing concise code for the following incr:
elessair 0:f269e3021894 270 *
elessair 0:f269e3021894 271 * function incr(p : pointer to int, a : int) returns int {
elessair 0:f269e3021894 272 * done = false
elessair 0:f269e3021894 273 * value = *p // This fetch operation need not be atomic.
elessair 0:f269e3021894 274 * while not done {
elessair 0:f269e3021894 275 * done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success
elessair 0:f269e3021894 276 * }
elessair 0:f269e3021894 277 * return value + a
elessair 0:f269e3021894 278 * }
elessair 0:f269e3021894 279 */
elessair 0:f269e3021894 280 bool core_util_atomic_cas_ptr(void **ptr, void **expectedCurrentValue, void *desiredValue);
elessair 0:f269e3021894 281
elessair 0:f269e3021894 282 /**
elessair 0:f269e3021894 283 * Atomic increment.
elessair 0:f269e3021894 284 * @param valuePtr Target memory location being incremented.
elessair 0:f269e3021894 285 * @param delta The amount being incremented.
elessair 0:f269e3021894 286 * @return The new incremented value.
elessair 0:f269e3021894 287 */
elessair 0:f269e3021894 288 uint8_t core_util_atomic_incr_u8(uint8_t *valuePtr, uint8_t delta);
elessair 0:f269e3021894 289
elessair 0:f269e3021894 290 /**
elessair 0:f269e3021894 291 * Atomic increment.
elessair 0:f269e3021894 292 * @param valuePtr Target memory location being incremented.
elessair 0:f269e3021894 293 * @param delta The amount being incremented.
elessair 0:f269e3021894 294 * @return The new incremented value.
elessair 0:f269e3021894 295 */
elessair 0:f269e3021894 296 uint16_t core_util_atomic_incr_u16(uint16_t *valuePtr, uint16_t delta);
elessair 0:f269e3021894 297
elessair 0:f269e3021894 298 /**
elessair 0:f269e3021894 299 * Atomic increment.
elessair 0:f269e3021894 300 * @param valuePtr Target memory location being incremented.
elessair 0:f269e3021894 301 * @param delta The amount being incremented.
elessair 0:f269e3021894 302 * @return The new incremented value.
elessair 0:f269e3021894 303 */
elessair 0:f269e3021894 304 uint32_t core_util_atomic_incr_u32(uint32_t *valuePtr, uint32_t delta);
elessair 0:f269e3021894 305
elessair 0:f269e3021894 306 /**
elessair 0:f269e3021894 307 * Atomic increment.
elessair 0:f269e3021894 308 * @param valuePtr Target memory location being incremented.
elessair 0:f269e3021894 309 * @param delta The amount being incremented in bytes.
elessair 0:f269e3021894 310 * @return The new incremented value.
elessair 0:f269e3021894 311 *
elessair 0:f269e3021894 312 * @note The type of the pointer argument is not taken into account
elessair 0:f269e3021894 313 * and the pointer is incremented by bytes.
elessair 0:f269e3021894 314 */
elessair 0:f269e3021894 315 void *core_util_atomic_incr_ptr(void **valuePtr, ptrdiff_t delta);
elessair 0:f269e3021894 316
elessair 0:f269e3021894 317 /**
elessair 0:f269e3021894 318 * Atomic decrement.
elessair 0:f269e3021894 319 * @param valuePtr Target memory location being decremented.
elessair 0:f269e3021894 320 * @param delta The amount being decremented.
elessair 0:f269e3021894 321 * @return The new decremented value.
elessair 0:f269e3021894 322 */
elessair 0:f269e3021894 323 uint8_t core_util_atomic_decr_u8(uint8_t *valuePtr, uint8_t delta);
elessair 0:f269e3021894 324
elessair 0:f269e3021894 325 /**
elessair 0:f269e3021894 326 * Atomic decrement.
elessair 0:f269e3021894 327 * @param valuePtr Target memory location being decremented.
elessair 0:f269e3021894 328 * @param delta The amount being decremented.
elessair 0:f269e3021894 329 * @return The new decremented value.
elessair 0:f269e3021894 330 */
elessair 0:f269e3021894 331 uint16_t core_util_atomic_decr_u16(uint16_t *valuePtr, uint16_t delta);
elessair 0:f269e3021894 332
elessair 0:f269e3021894 333 /**
elessair 0:f269e3021894 334 * Atomic decrement.
elessair 0:f269e3021894 335 * @param valuePtr Target memory location being decremented.
elessair 0:f269e3021894 336 * @param delta The amount being decremented.
elessair 0:f269e3021894 337 * @return The new decremented value.
elessair 0:f269e3021894 338 */
elessair 0:f269e3021894 339 uint32_t core_util_atomic_decr_u32(uint32_t *valuePtr, uint32_t delta);
elessair 0:f269e3021894 340
elessair 0:f269e3021894 341 /**
elessair 0:f269e3021894 342 * Atomic decrement.
elessair 0:f269e3021894 343 * @param valuePtr Target memory location being decremented.
elessair 0:f269e3021894 344 * @param delta The amount being decremented in bytes.
elessair 0:f269e3021894 345 * @return The new decremented value.
elessair 0:f269e3021894 346 *
elessair 0:f269e3021894 347 * @note The type of the pointer argument is not taken into account
elessair 0:f269e3021894 348 * and the pointer is decremented by bytes
elessair 0:f269e3021894 349 */
elessair 0:f269e3021894 350 void *core_util_atomic_decr_ptr(void **valuePtr, ptrdiff_t delta);
elessair 0:f269e3021894 351
elessair 0:f269e3021894 352 #ifdef __cplusplus
elessair 0:f269e3021894 353 } // extern "C"
elessair 0:f269e3021894 354 #endif
elessair 0:f269e3021894 355
elessair 0:f269e3021894 356
elessair 0:f269e3021894 357 #endif // __MBED_UTIL_CRITICAL_H__
elessair 0:f269e3021894 358
elessair 0:f269e3021894 359 /** @}*/