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

4.104.114.84.95
Last change on this file since fa6b0f5 was a8eed23, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/27/05 at 05:57:05

Include config.h.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 *  ISR Handler
3 *
4 *
5 *  COPYRIGHT (c) 1989-1999.
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
25/*  _ISR_Handler_initialization
26 *
27 *  This routine initializes the ISR handler.
28 *
29 *  Input parameters: NONE
30 *
31 *  Output parameters: NONE
32 */
33
34void _ISR_Handler_initialization( void )
35{
36  _ISR_Signals_to_thread_executing = FALSE;
37
38  _ISR_Nest_level = 0;
39
40  _ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
41     sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS
42  );
43
44  _CPU_Initialize_vectors();
45
46#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
47
48  if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE )
49    _Internal_error_Occurred(
50      INTERNAL_ERROR_CORE,
51      TRUE,
52      INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
53    );
54
55  _CPU_Interrupt_stack_low =
56    _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size );
57
58  _CPU_Interrupt_stack_high = _Addresses_Add_offset(
59    _CPU_Interrupt_stack_low,
60    _CPU_Table.interrupt_stack_size
61  );
62
63#endif
64
65#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
66  _CPU_Install_interrupt_stack();
67#endif
68
69}
Note: See TracBrowser for help on using the repository browser.