source: rtems/cpukit/score/src/percpuasm.c @ c236082

4.11
Last change on this file since c236082 was c236082, checked in by Sebastian Huber <sebastian.huber@…>, on Jul 30, 2013 at 1:54:53 PM

smp: Provide cache optimized Per_CPU_Control

Delete _Per_CPU_Information_p.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Obere Lagerstr. 30
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.com/license/LICENSE.
13 */
14
15#if HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include <rtems/score/cpu.h>
20
21#define _RTEMS_PERCPU_DEFINE_OFFSETS
22#include <rtems/score/percpu.h>
23
24RTEMS_STATIC_ASSERT(
25  sizeof(void *) == CPU_SIZEOF_POINTER,
26  CPU_SIZEOF_POINTER
27);
28
29#if defined( __SIZEOF_POINTER__ )
30  RTEMS_STATIC_ASSERT(
31    CPU_SIZEOF_POINTER == __SIZEOF_POINTER__,
32    __SIZEOF_POINTER__
33  );
34#endif
35
36#if defined( RTEMS_SMP )
37  RTEMS_STATIC_ASSERT(
38    sizeof( Per_CPU_Control_envelope ) == PER_CPU_CONTROL_SIZE,
39    PER_CPU_CONTROL_SIZE
40  );
41#endif
42
43RTEMS_STATIC_ASSERT(
44  offsetof(Per_CPU_Control, isr_nest_level) == PER_CPU_ISR_NEST_LEVEL,
45  PER_CPU_ISR_NEST_LEVEL
46);
47
48RTEMS_STATIC_ASSERT(
49  offsetof(Per_CPU_Control, dispatch_necessary) == PER_CPU_DISPATCH_NEEDED,
50  PER_CPU_DISPATCH_NEEDED
51);
52
53#if CPU_ALLOCATE_INTERRUPT_STACK == TRUE \
54  || CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE
55  RTEMS_STATIC_ASSERT(
56    offsetof(Per_CPU_Control, interrupt_stack_low)
57      == PER_CPU_INTERRUPT_STACK_LOW,
58    PER_CPU_INTERRUPT_STACK_LOW
59  );
60
61  RTEMS_STATIC_ASSERT(
62    offsetof(Per_CPU_Control, interrupt_stack_high)
63      == PER_CPU_INTERRUPT_STACK_HIGH,
64    PER_CPU_INTERRUPT_STACK_HIGH
65  );
66#endif
Note: See TracBrowser for help on using the repository browser.