Changeset a4722f82 in rtems for c/src/lib/libbsp/powerpc/ep1a


Ignore:
Timestamp:
Nov 6, 2007, 10:19:41 PM (12 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, 4.9, master
Children:
ac654234
Parents:
db1986a
Message:

2007-11-06 Till Straumann <strauman@…>

  • ep1a/irq/irq.c, gen5200/irq/irq.c, mbx8xx/irq/irq.c, mpc8260ads/irq/irq.c, mvme5500/irq/irq.c, psim/irq/irq.c, score603e/irq/irq.c, shared/irq/irq.c: test for non-NULL-ness before calling 'on'/'off' methods so that users don't have to provide no-ops if they don't want this feature.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ep1a/irq/irq.c

    rdb1986a ra4722f82  
    155155     * Enable interrupt on device
    156156     */
    157     irq->on(irq);
     157        if (irq->on)
     158        irq->on(irq);
    158159   
    159160    rtems_interrupt_enable(level);
     
    217218     * Enable interrupt on device
    218219     */
    219     irq->on(irq);
     220        if (irq->on)
     221        irq->on(irq);
    220222   
    221223    rtems_interrupt_enable(level);
     
    309311     * Disable interrupt on device
    310312     */
    311     irq->off(irq);
     313        if (irq->off)
     314        irq->off(irq);
    312315
    313316    /*
     
    375378                 vchain = (rtems_irq_connect_data*)vchain->next_handler )
    376379            {
     380                          if(vchain->on)
    377381               vchain->on(vchain);
    378382            }
     
    381385      }
    382386      else {
    383          /* rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]); */
     387         /* if (rtems_hdl_tbl[i].off) rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]); */
    384388         {
    385389            rtems_irq_connect_data* vchain;
     
    388392                 vchain = (rtems_irq_connect_data*)vchain->next_handler )
    389393            {
     394                          if (vchain->off)
    390395               vchain->off(vchain);
    391396            }
     
    404409    for (i=BSP_PROCESSOR_IRQ_LOWEST_OFFSET; i < BSP_PROCESSOR_IRQ_LOWEST_OFFSET + BSP_PROCESSOR_IRQ_NUMBER; i++) {
    405410      if (rtems_hdl_tbl[i].hdl != default_rtems_entry.hdl) {
    406          /* rtems_hdl_tbl[i].on(&rtems_hdl_tbl[i]); */
     411         /* if (rtems_hdl_tbl[i].on) rtems_hdl_tbl[i].on(&rtems_hdl_tbl[i]); */
    407412         {
    408413            rtems_irq_connect_data* vchain;
     
    411416                 vchain = (rtems_irq_connect_data*)vchain->next_handler )
    412417            {
     418                          if (vchain->on)
    413419               vchain->on(vchain);
    414420            }
     
    417423      }
    418424      else {
    419          /* rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]); */
     425         /* if (rtems_hdl_tbl[i].off) rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]); */
    420426         {
    421427            rtems_irq_connect_data* vchain;
     
    424430                 vchain = (rtems_irq_connect_data*)vchain->next_handler )
    425431            {
     432                          if (vchain->off)
    426433               vchain->off(vchain);
    427434            }
Note: See TracChangeset for help on using the changeset viewer.