Changeset 57740ce8 in rtems for cpukit/score/src/percpuasm.c


Ignore:
Timestamp:
Apr 7, 2014, 12:50:24 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
fb9e98e
Parents:
d507c037
git-author:
Sebastian Huber <sebastian.huber@…> (04/07/14 12:50:24)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/07/14 12:51:31)
Message:

score: Clarify CPU port alignment requirements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/percpuasm.c

    rd507c037 r57740ce8  
    11/*
    2  * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2012-2014 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
    5  *  Obere Lagerstr. 30
     5 *  Dornierstr. 4
    66 *  82178 Puchheim
    77 *  Germany
     
    2121#define _RTEMS_PERCPU_DEFINE_OFFSETS
    2222#include <rtems/score/percpu.h>
     23
     24/*
     25 * In case a CPU port needs another alignment, then add this here and make sure
     26 * it is a power of two greater than or equal to two.
     27 */
     28RTEMS_STATIC_ASSERT(
     29  CPU_ALIGNMENT == 2
     30    || CPU_ALIGNMENT == 4
     31    || CPU_ALIGNMENT == 8
     32    || CPU_ALIGNMENT == 16
     33    || CPU_ALIGNMENT == 32,
     34  CPU_ALIGNMENT
     35);
     36
     37/*
     38 * In case a CPU port needs another heap alignment, then add this here and make
     39 * sure it is a power of two greater than or equal to two.
     40 */
     41RTEMS_STATIC_ASSERT(
     42  CPU_HEAP_ALIGNMENT == 2
     43    || CPU_HEAP_ALIGNMENT == 4
     44    || CPU_HEAP_ALIGNMENT == 8
     45    || CPU_HEAP_ALIGNMENT == 16
     46    || CPU_HEAP_ALIGNMENT == 32,
     47  CPU_HEAP_ALIGNMENT_0
     48);
     49
     50RTEMS_STATIC_ASSERT(
     51  CPU_HEAP_ALIGNMENT >= CPU_ALIGNMENT,
     52  CPU_HEAP_ALIGNMENT_1
     53);
    2354
    2455RTEMS_STATIC_ASSERT(
Note: See TracChangeset for help on using the changeset viewer.