Changeset 4288f9fd in rtems


Ignore:
Timestamp:
Aug 27, 2013, 1:10:50 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
58a70b76
Parents:
2bbcb64
git-author:
Sebastian Huber <sebastian.huber@…> (08/27/13 13:10:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/28/13 12:58:50)
Message:

score: Use static inline directly

This file uses already C11 features. Include proper header file.

Location:
cpukit/score/include/rtems/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/atomic.h

    r2bbcb64 r4288f9fd  
    4545 * @param value a value to be stored into object.
    4646 */
    47 RTEMS_INLINE_ROUTINE void _Atomic_Init_uint(
     47static inline void _Atomic_Init_uint(
    4848  volatile Atomic_Uint *object,
    4949  uint_fast32_t value
     
    5353}
    5454
    55 RTEMS_INLINE_ROUTINE void _Atomic_Init_ptr(
     55static inline void _Atomic_Init_ptr(
    5656  volatile Atomic_Pointer *object,
    5757  uintptr_t value
     
    6161}
    6262
    63 RTEMS_INLINE_ROUTINE void _Atomic_Init_flag(
     63static inline void _Atomic_Init_flag(
    6464  volatile Atomic_Flag *object,
    6565  _Bool value
     
    7777 * The order shall not be ATOMIC_ORDER_RELEASE.
    7878 */
    79 RTEMS_INLINE_ROUTINE uint_fast32_t _Atomic_Load_uint(
     79static inline uint_fast32_t _Atomic_Load_uint(
    8080  volatile Atomic_Uint *object,
    8181  Atomic_Order order
     
    8585}
    8686
    87 RTEMS_INLINE_ROUTINE uintptr_t _Atomic_Load_ptr(
     87static inline uintptr_t _Atomic_Load_ptr(
    8888  volatile Atomic_Pointer *object,
    8989  Atomic_Order order
     
    102102 * The order shall not be ATOMIC_ORDER_ACQUIRE.
    103103 */
    104 RTEMS_INLINE_ROUTINE void _Atomic_Store_uint(
     104static inline void _Atomic_Store_uint(
    105105  volatile Atomic_Uint *object,
    106106  uint_fast32_t value,
     
    111111}
    112112
    113 RTEMS_INLINE_ROUTINE void _Atomic_Store_ptr(
     113static inline void _Atomic_Store_ptr(
    114114  volatile Atomic_Pointer *object,
    115115  uintptr_t value,
     
    129129 * @retval a result value before add ops.
    130130 */
    131 RTEMS_INLINE_ROUTINE uint_fast32_t _Atomic_Fetch_add_uint(
     131static inline uint_fast32_t _Atomic_Fetch_add_uint(
    132132  volatile Atomic_Uint *object,
    133133  uint_fast32_t value,
     
    138138}
    139139
    140 RTEMS_INLINE_ROUTINE uintptr_t _Atomic_Fetch_add_ptr(
     140static inline uintptr_t _Atomic_Fetch_add_ptr(
    141141  volatile Atomic_Pointer *object,
    142142  uintptr_t value,
     
    156156 * @retval a result value before sub ops.
    157157 */
    158 RTEMS_INLINE_ROUTINE uint_fast32_t _Atomic_Fetch_sub_uint(
     158static inline uint_fast32_t _Atomic_Fetch_sub_uint(
    159159  volatile Atomic_Uint *object,
    160160  uint_fast32_t value,
     
    165165}
    166166
    167 RTEMS_INLINE_ROUTINE uintptr_t _Atomic_Fetch_sub_ptr(
     167static inline uintptr_t _Atomic_Fetch_sub_ptr(
    168168  volatile Atomic_Pointer *object,
    169169  uintptr_t value,
     
    183183 * @retval a result value before or ops.
    184184 */
    185 RTEMS_INLINE_ROUTINE uint_fast32_t _Atomic_Fetch_or_uint(
     185static inline uint_fast32_t _Atomic_Fetch_or_uint(
    186186  volatile Atomic_Uint *object,
    187187  uint_fast32_t value,
     
    192192}
    193193
    194 RTEMS_INLINE_ROUTINE uintptr_t _Atomic_Fetch_or_ptr(
     194static inline uintptr_t _Atomic_Fetch_or_ptr(
    195195  volatile Atomic_Pointer *object,
    196196  uintptr_t value,
     
    210210 * @retval a result value before and ops.
    211211 */
    212 RTEMS_INLINE_ROUTINE uint_fast32_t _Atomic_Fetch_and_uint(
     212static inline uint_fast32_t _Atomic_Fetch_and_uint(
    213213  volatile Atomic_Uint *object,
    214214  uint_fast32_t value,
     
    219219}
    220220
    221 RTEMS_INLINE_ROUTINE uintptr_t _Atomic_Fetch_and_ptr(
     221static inline uintptr_t _Atomic_Fetch_and_ptr(
    222222  volatile Atomic_Pointer *object,
    223223  uintptr_t value,
     
    237237 * @retval a result value before exchange ops.
    238238 */
    239 RTEMS_INLINE_ROUTINE uint_fast32_t _Atomic_Exchange_uint(
     239static inline uint_fast32_t _Atomic_Exchange_uint(
    240240 volatile Atomic_Uint *object,
    241241 uint_fast32_t value,
     
    246246}
    247247
    248 RTEMS_INLINE_ROUTINE uintptr_t _Atomic_Exchange_ptr(
     248static inline uintptr_t _Atomic_Exchange_ptr(
    249249 volatile Atomic_Pointer *object,
    250250 uintptr_t value,
     
    269269 * @retval false if the compare exchange failed.
    270270 */
    271 RTEMS_INLINE_ROUTINE bool _Atomic_Compare_exchange_uint(
     271static inline bool _Atomic_Compare_exchange_uint(
    272272  volatile Atomic_Uint *object,
    273273  uint_fast32_t *old_value,
     
    281281}
    282282
    283 RTEMS_INLINE_ROUTINE bool _Atomic_Compare_exchange_ptr(
     283static inline bool _Atomic_Compare_exchange_ptr(
    284284  volatile Atomic_Pointer *object,
    285285  uintptr_t *old_value,
     
    300300 *
    301301 */
    302 RTEMS_INLINE_ROUTINE void _Atomic_Clear_flag(
     302static inline void _Atomic_Clear_flag(
    303303 volatile Atomic_Flag *object,
    304304 Atomic_Order order
     
    317317 * @retval false if the test and set failed.
    318318 */
    319 RTEMS_INLINE_ROUTINE bool _Atomic_Test_set_flag(
     319static inline bool _Atomic_Test_set_flag(
    320320 volatile Atomic_Flag *object,
    321321 Atomic_Order order
  • cpukit/score/include/rtems/score/cpustdatomic.h

    r2bbcb64 r4288f9fd  
    2020
    2121#include <stdatomic.h>
    22 #include <rtems/score/types.h>
     22#include <stdbool.h>
    2323
    2424#ifdef __cplusplus
     
    8282 * @param value a value to be stored into object.
    8383 */
    84 RTEMS_INLINE_ROUTINE void _CPU_atomic_Init_uint(
     84static inline void _CPU_atomic_Init_uint(
    8585  volatile Atomic_Uint *object,
    8686  uint_fast32_t value
     
    9090}
    9191
    92 RTEMS_INLINE_ROUTINE void _CPU_atomic_Init_ptr(
     92static inline void _CPU_atomic_Init_ptr(
    9393  volatile Atomic_Pointer *object,
    9494  uintptr_t value
     
    9898}
    9999
    100 RTEMS_INLINE_ROUTINE void _CPU_atomic_Init_flag(
     100static inline void _CPU_atomic_Init_flag(
    101101  volatile Atomic_Flag *object,
    102102  _Bool value
     
    114114 * The order shall not be ATOMIC_ORDER_RELEASE.
    115115 */
    116 RTEMS_INLINE_ROUTINE uint_fast32_t _CPU_atomic_Load_uint(
     116static inline uint_fast32_t _CPU_atomic_Load_uint(
    117117  volatile Atomic_Uint *object,
    118118  Atomic_Order order
     
    122122}
    123123
    124 RTEMS_INLINE_ROUTINE uintptr_t _CPU_atomic_Load_ptr(
     124static inline uintptr_t _CPU_atomic_Load_ptr(
    125125  volatile Atomic_Pointer *object,
    126126  Atomic_Order order
     
    139139 * The order shall not be ATOMIC_ORDER_ACQUIRE.
    140140 */
    141 RTEMS_INLINE_ROUTINE void _CPU_atomic_Store_uint(
     141static inline void _CPU_atomic_Store_uint(
    142142  volatile Atomic_Uint *object,
    143143  uint_fast32_t value,
     
    148148}
    149149
    150 RTEMS_INLINE_ROUTINE void _CPU_atomic_Store_ptr(
     150static inline void _CPU_atomic_Store_ptr(
    151151  volatile Atomic_Pointer *object,
    152152  uintptr_t value,
     
    166166 * @retval a result value before add ops.
    167167 */
    168 RTEMS_INLINE_ROUTINE uint_fast32_t _CPU_atomic_Fetch_add_uint(
     168static inline uint_fast32_t _CPU_atomic_Fetch_add_uint(
    169169  volatile Atomic_Uint *object,
    170170  uint_fast32_t value,
     
    175175}
    176176
    177 RTEMS_INLINE_ROUTINE uintptr_t _CPU_atomic_Fetch_add_ptr(
     177static inline uintptr_t _CPU_atomic_Fetch_add_ptr(
    178178  volatile Atomic_Pointer *object,
    179179  uintptr_t value,
     
    193193 * @retval a result value before sub ops.
    194194 */
    195 RTEMS_INLINE_ROUTINE uint_fast32_t _CPU_atomic_Fetch_sub_uint(
     195static inline uint_fast32_t _CPU_atomic_Fetch_sub_uint(
    196196  volatile Atomic_Uint *object,
    197197  uint_fast32_t value,
     
    202202}
    203203
    204 RTEMS_INLINE_ROUTINE uintptr_t _CPU_atomic_Fetch_sub_ptr(
     204static inline uintptr_t _CPU_atomic_Fetch_sub_ptr(
    205205  volatile Atomic_Pointer *object,
    206206  uintptr_t value,
     
    220220 * @retval a result value before or ops.
    221221 */
    222 RTEMS_INLINE_ROUTINE uint_fast32_t _CPU_atomic_Fetch_or_uint(
     222static inline uint_fast32_t _CPU_atomic_Fetch_or_uint(
    223223  volatile Atomic_Uint *object,
    224224  uint_fast32_t value,
     
    229229}
    230230
    231 RTEMS_INLINE_ROUTINE uintptr_t _CPU_atomic_Fetch_or_ptr(
     231static inline uintptr_t _CPU_atomic_Fetch_or_ptr(
    232232  volatile Atomic_Pointer *object,
    233233  uintptr_t value,
     
    247247 * @retval a result value before and ops.
    248248 */
    249 RTEMS_INLINE_ROUTINE uint_fast32_t _CPU_atomic_Fetch_and_uint(
     249static inline uint_fast32_t _CPU_atomic_Fetch_and_uint(
    250250  volatile Atomic_Uint *object,
    251251  uint_fast32_t value,
     
    256256}
    257257
    258 RTEMS_INLINE_ROUTINE uintptr_t _CPU_atomic_Fetch_and_ptr(
     258static inline uintptr_t _CPU_atomic_Fetch_and_ptr(
    259259  volatile Atomic_Pointer *object,
    260260  uintptr_t value,
     
    274274 * @retval a result value before exchange ops.
    275275 */
    276 RTEMS_INLINE_ROUTINE uint_fast32_t _CPU_atomic_Exchange_uint(
     276static inline uint_fast32_t _CPU_atomic_Exchange_uint(
    277277 volatile Atomic_Uint *object,
    278278 uint_fast32_t value,
     
    283283}
    284284
    285 RTEMS_INLINE_ROUTINE uintptr_t _CPU_atomic_Exchange_ptr(
     285static inline uintptr_t _CPU_atomic_Exchange_ptr(
    286286 volatile Atomic_Pointer *object,
    287287 uintptr_t value,
     
    306306 * @retval false if the compare exchange failed.
    307307 */
    308 RTEMS_INLINE_ROUTINE bool _CPU_atomic_Compare_exchange_uint(
     308static inline bool _CPU_atomic_Compare_exchange_uint(
    309309  volatile Atomic_Uint *object,
    310310  uint_fast32_t *old_value,
     
    318318}
    319319
    320 RTEMS_INLINE_ROUTINE bool _CPU_atomic_Compare_exchange_ptr(
     320static inline bool _CPU_atomic_Compare_exchange_ptr(
    321321  volatile Atomic_Pointer *object,
    322322  uintptr_t *old_value,
     
    337337 *
    338338 */
    339 RTEMS_INLINE_ROUTINE void _CPU_atomic_Clear_flag(
     339static inline void _CPU_atomic_Clear_flag(
    340340 volatile Atomic_Flag *object,
    341341 Atomic_Order order
     
    354354 * @retval false if the test and set failed.
    355355 */
    356 RTEMS_INLINE_ROUTINE bool _CPU_atomic_Test_set_flag(
     356static inline bool _CPU_atomic_Test_set_flag(
    357357 volatile Atomic_Flag *object,
    358358 Atomic_Order order
Note: See TracChangeset for help on using the changeset viewer.