Ignore:
Timestamp:
Nov 14, 2012, 12:59:27 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
b1e8a58
Parents:
b9bc399
git-author:
Sebastian Huber <sebastian.huber@…> (11/14/12 12:59:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/15/12 14:33:13)
Message:

bsps: Interrupt initialization error is fatal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/src/irq-generic.c

    rb9bc399 rdd8df59  
    1010 * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
    1111 *
    12  * Copyright (c) 2008, 2009
    13  * embedded brains GmbH
    14  * Obere Lagerstr. 30
    15  * D-82178 Puchheim
    16  * Germany
    17  * <rtems@embedded-brains.de>
     12 * Copyright (c) 2008-2012 embedded brains GmbH.
     13 *
     14 *  embedded brains GmbH
     15 *  Obere Lagerstr. 30
     16 *  82178 Puchheim
     17 *  Germany
     18 *  <rtems@embedded-brains.de>
    1819 *
    1920 * The license and distribution terms for this file may be
     
    2324
    2425#include <bsp/irq-generic.h>
     26#include <bsp/bootcard.h>
    2527
    2628#include <stdlib.h>
     
    156158}
    157159
    158 rtems_status_code bsp_interrupt_initialize(void)
     160void bsp_interrupt_initialize(void)
    159161{
    160162  rtems_status_code sc = RTEMS_SUCCESSFUL;
    161163  size_t i = 0;
    162 
    163   bsp_interrupt_lock();
    164 
    165   if (bsp_interrupt_is_initialized()) {
    166     bsp_interrupt_unlock();
    167     return RTEMS_INTERNAL_ERROR;
    168   }
    169164
    170165  /* Initialize handler table */
     
    176171  sc = bsp_interrupt_facility_initialize();
    177172  if (sc != RTEMS_SUCCESSFUL) {
    178     bsp_interrupt_unlock();
    179     return sc;
     173    rtems_fatal(
     174      RTEMS_FATAL_SOURCE_BSP_GENERIC,
     175      BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION
     176    );
    180177  }
    181178
    182179  bsp_interrupt_set_initialized();
    183 
    184   bsp_interrupt_unlock();
    185 
    186   return RTEMS_SUCCESSFUL;
    187180}
    188181
Note: See TracChangeset for help on using the changeset viewer.