source: rtems/cpukit/score/src/isr.c @ aae7f1a1

4.104.115
Last change on this file since aae7f1a1 was aae7f1a1, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/22/08 at 05:52:32

Eliminate TRUE/FALSE.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  ISR Handler
3 *
4 *
5 *  COPYRIGHT (c) 1989-2008.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#if HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <rtems/system.h>
20#include <rtems/score/isr.h>
21#include <rtems/score/stack.h>
22#include <rtems/score/interr.h>
23#include <rtems/score/wkspace.h>
24#include <rtems/config.h>
25
26/*  _ISR_Handler_initialization
27 *
28 *  This routine initializes the ISR handler.
29 *
30 *  Input parameters: NONE
31 *
32 *  Output parameters: NONE
33 */
34
35void _ISR_Handler_initialization( void )
36{
37  _ISR_Signals_to_thread_executing = false;
38
39  _ISR_Nest_level = 0;
40
41#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
42  _ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
43     sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS
44  );
45#endif
46
47  _CPU_Initialize_vectors();
48
49#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
50
51  if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
52    _Internal_error_Occurred(
53      INTERNAL_ERROR_CORE,
54      true,
55      INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
56    );
57
58  _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
59    Configuration.interrupt_stack_size
60  );
61
62  _CPU_Interrupt_stack_high = _Addresses_Add_offset(
63    _CPU_Interrupt_stack_low,
64    Configuration.interrupt_stack_size
65  );
66
67#endif
68
69#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
70  _CPU_Install_interrupt_stack();
71#endif
72
73}
Note: See TracBrowser for help on using the repository browser.