summaryrefslogblamecommitdiffstats
path: root/cpukit/score/cpu/nios2/nios2-isr-install-vector.c
blob: 7ffaf2ad4e5571d1439ffa4b43aadf27e0272eb8 (plain) (tree)
1
2
3
4
5
6





                                      







                                                          
                                        


                    
                   



                            
                             


                               




                                              





                                                                            
/**
 * @file
 *
 * @brief NIOS2 CPU ISR Install Vector
 */

/*
 * Copyright (c) 2006 Kolja Waschk (rtemsdev/ixo.de)
 *
 * COPYRIGHT (c) 1989-2006
 * On-Line Applications Research Corporation (OAR).
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <rtems/score/isr.h>

void _CPU_ISR_install_vector(
  uint32_t         vector,
  CPU_ISR_handler  new_handler,
  CPU_ISR_handler *old_handler
)
{
   *old_handler = _ISR_Vector_table[ vector ];

   /*
    *  We put the actual user ISR address in '_ISR_vector_table'.  This will
    *  be used by the _ISR_Handler so the user gets control.
    */

    _ISR_Vector_table[ vector ] = new_handler;
}