mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 14:18:20 +00:00
@@ -219,6 +219,21 @@
|
||||
#define RTEMS_WEAK_ALIAS( _target )
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Returns the specified value aligned down to the specified alignment.
|
||||
*
|
||||
* @param _value is the value to align down.
|
||||
*
|
||||
* @param _alignment is the desired alignment in bytes. The alignment shall be
|
||||
* a power of two, otherwise the returned value is undefined. The alignment
|
||||
* parameter is evaluated twice.
|
||||
*
|
||||
* @return The specified value aligned down to the specified alignment is
|
||||
* returned.
|
||||
*/
|
||||
#define RTEMS_ALIGN_DOWN( _value, _alignment ) \
|
||||
( ( _value ) & ~( ( _alignment ) - 1 ) )
|
||||
|
||||
/**
|
||||
* @brief Instructs the compiler to enforce the specified alignment.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user