Changeset c6810c8 in rtems for c/src/lib/libbsp/i386


Ignore:
Timestamp:
Jun 19, 2017, 12:09:28 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ae3e6af8
Parents:
b361cb6c
git-author:
Sebastian Huber <sebastian.huber@…> (06/19/17 12:09:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/20/17 05:42:25)
Message:

bsps: Improve interrupt vector enable/disable API

Change bsp_interrupt_vector_enable() and bsp_interrupt_vector_disable()
to not return a status code. Add bsp_interrupt_assert() and use it to
validate the vector number in the vector enable/disable implementations.

Location:
c/src/lib/libbsp/i386
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/timer/timer.c

    rb361cb6c rc6810c8  
    154154}
    155155
    156 static int timerIsOn(const rtems_raw_irq_connect_data *used)
    157 {
    158   return bsp_interrupt_vector_enable(used->idtIndex - BSP_IRQ_VECTOR_BASE);
    159 }
    160 
    161156static rtems_raw_irq_connect_data timer_raw_irq_data = {
    162157  BSP_PERIODIC_TIMER + BSP_IRQ_VECTOR_BASE,
     
    164159  timerOn,
    165160  timerOff,
    166   timerIsOn
     161  NULL
    167162};
    168163
  • c/src/lib/libbsp/i386/shared/comm/i386-stub-glue.c

    rb361cb6c rc6810c8  
    174174}
    175175
    176 static int BSP_uart_isOn(const rtems_raw_irq_connect_data* used)
    177 {
    178   return bsp_interrupt_vector_enable(used->idtIndex - BSP_IRQ_VECTOR_BASE);
    179 }
    180 
    181176/*
    182177 * In order to have a possibility to break into
     
    211206    uart_raw_irq_data.on  = BSP_uart_on;
    212207    uart_raw_irq_data.off = BSP_uart_off;
    213     uart_raw_irq_data.isOn= BSP_uart_isOn;
    214208
    215209    /* Install ISR  */
  • c/src/lib/libbsp/i386/shared/irq/irq.c

    rb361cb6c rc6810c8  
    271271}
    272272
    273 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
    274 {
    275   if (bsp_interrupt_vector_is_valid(vector))
    276     BSP_irq_enable_at_i8259a(vector);
    277   return RTEMS_SUCCESSFUL;
    278 }
    279 
    280 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
    281 {
    282   if (bsp_interrupt_vector_is_valid(vector))
    283     BSP_irq_disable_at_i8259a(vector);
    284   return RTEMS_SUCCESSFUL;
     273void bsp_interrupt_vector_enable(rtems_vector_number vector)
     274{
     275  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     276  BSP_irq_enable_at_i8259a(vector);
     277}
     278
     279void bsp_interrupt_vector_disable(rtems_vector_number vector)
     280{
     281  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     282  BSP_irq_disable_at_i8259a(vector);
    285283}
    286284
Note: See TracChangeset for help on using the changeset viewer.