Changeset a72f16e in rtems


Ignore:
Timestamp:
Sep 5, 2014, 6:32:28 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
ddf8d12
Parents:
2a86615
git-author:
Sebastian Huber <sebastian.huber@…> (09/05/14 06:32:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/08/14 05:53:02)
Message:

score: Add RTEMS_DECONST|DEVOLATILE|DEQUALIFY()

File:
1 edited

Legend:

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

    r2a86615 ra72f16e  
    228228  ( (_type *) ( (uintptr_t) ( _m ) - offsetof( _type, _member_name ) ) )
    229229
     230/**
     231 * @brief Removes the const qualifier from a type of a variable.
     232 *
     233 * @param[in] _type The target type for the variable.
     234 * @param[in] _var The variable.
     235 */
     236#define RTEMS_DECONST( _type, _var ) \
     237  ((_type)(uintptr_t)(const void *) ( _var ))
     238
     239/**
     240 * @brief Removes the volatile qualifier from a type of a variable.
     241 *
     242 * @param[in] _type The target type for the variable.
     243 * @param[in] _var The variable.
     244 */
     245#define RTEMS_DEVOLATILE( _type, _var ) \
     246  ((_type)(uintptr_t)(volatile void *) ( _var ))
     247
     248/**
     249 * @brief Removes the all qualifiers from a type of a variable.
     250 *
     251 * @param[in] _type The target type for the variable.
     252 * @param[in] _var The variable.
     253 */
     254#define RTEMS_DEQUALIFY( _type, _var ) \
     255  ((_type)(uintptr_t)(const volatile void *) ( _var ))
     256
    230257#ifndef ASM
    231258  #ifdef RTEMS_DEPRECATED_TYPES
Note: See TracChangeset for help on using the changeset viewer.