Changeset 97eaefd4 in rtems


Ignore:
Timestamp:
Oct 12, 2016, 8:44:51 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
be57318
Parents:
2ba0c035
git-author:
Sebastian Huber <sebastian.huber@…> (10/12/16 08:44:51)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/12/16 08:58:27)
Message:

score: Add RTEMS_OBFUSCATE_POINTER()

Update #2790.

File:
1 edited

Legend:

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

    r2ba0c035 r97eaefd4  
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
    13  *  Copyright (c) 2010-2015 embedded brains GmbH.
     13 *  Copyright (c) 2010, 2016 embedded brains GmbH.
    1414 *
    1515 *  The license and distribution terms for this file may be
     
    220220#else
    221221  #define RTEMS_PRINTFLIKE( _format_pos, _ap_pos )
     222#endif
     223
     224/**
     225 * @brief Obfuscates the pointer so that the compiler cannot perform
     226 * optimizations based on the pointer value.
     227 */
     228#if defined(__GNUC__)
     229  #define RTEMS_OBFUSCATE_POINTER( _ptr ) __asm__("" : "+r" (_ptr))
     230#else
     231  #define RTEMS_OBFUSCATE_POINTER( _ptr ) (void) (_ptr)
    222232#endif
    223233
Note: See TracChangeset for help on using the changeset viewer.