RTEMS: Generic

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Files | Macros
Generic
Board Support Packages » SPARC64

Generic. More...

## Files
file | align.h
file | gentypes.h
file | align.h
| Macros for making values and addresses aligned.

## Macros
#define | ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1))
#define | ALIGN_DOWN(s, a) ((s) & ~((a) - 1))
#define | ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1))

## Detailed Description

Generic.

## Macro Definition Documentation

## ◆ ALIGN_DOWN

#define ALIGN_DOWN | ( |  | s,
|  |  | a
| ) |  | ((s) & ~((a) - 1))

Align to the nearest lower address.

Parameters

  s | Address or size to be aligned.
  a | Size of alignment, must be power of 2.

## ◆ ALIGN_UP [1/2]

#define ALIGN_UP | ( |  | addr,
|  |  | align
| ) |  | (((addr) + ((align) - 1)) & ~((align) - 1))

Align to the nearest higher address.

Parameters

  addr | Address or size to be aligned.
  align | Size of alignment, must be power of 2.

## ◆ ALIGN_UP [2/2]

#define ALIGN_UP | ( |  | s,
|  |  | a
| ) |  | (((s) + ((a) - 1)) & ~((a) - 1))

Align to the nearest higher address.

Parameters

  s | Address or size to be aligned.
  a | Size of alignment, must be power of 2.