Changeset 4035637 in rtems


Ignore:
Timestamp:
Aug 21, 2003, 5:06:17 PM (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
b0b9b3dc
Parents:
998bb06
Message:

2003-08-21 Till Strauman <strauman@…>

PR 456/bsps

  • irq/irq.c: Fix race condition when installing an ISR.
Location:
c/src/lib/libbsp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/shared/ChangeLog

    r998bb06 r4035637  
     12003-08-21      Till Strauman <strauman@slac.stanford.edu>
     2
     3        PR 456/bsps
     4        * irq/irq.c: Fix race condition when installing an ISR.
     5
    162003-07-16      Greg Menke <gregory.menke@gsfc.nasa.gov>
    27
  • c/src/lib/libbsp/i386/shared/irq/irq.c

    r998bb06 r4035637  
    236236     * to get the previous handler before accepting to disconnect.
    237237     */
     238    _CPU_ISR_Disable(level);
    238239    if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) {
    239       return 0;
    240     }
    241     _CPU_ISR_Disable(level);
     240          _CPU_ISR_Enable(level);
     241      return 0;
     242    }
    242243
    243244    /*
     
    266267int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* irq)
    267268{
     269     unsigned int level;
     270
    268271     if (!isValidInterrupt(irq->name)) {
    269272      return 0;
    270273     }
     274    _CPU_ISR_Disable(level);
    271275     *irq = rtems_hdl_tbl[irq->name];
     276    _CPU_ISR_Enable(level);
    272277     return 1;
    273278}
     
    287292     * to get the previous handler before accepting to disconnect.
    288293     */
     294    _CPU_ISR_Disable(level);
    289295    if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) {
    290       return 0;
    291     }
    292     _CPU_ISR_Disable(level);
     296      _CPU_ISR_Enable(level);
     297      return 0;
     298    }
    293299
    294300    /*
  • c/src/lib/libbsp/powerpc/shared/ChangeLog

    r998bb06 r4035637  
     12003-08-21      Till Strauman <strauman@slac.stanford.edu>
     2
     3        PR 456/bsps
     4        * irq/irq.c: Fix race condition when installing an ISR.
     5
    162003-08-05      Till Strauman <strauman@slac.stanford.edu>
    27
  • c/src/lib/libbsp/powerpc/shared/irq/irq.c

    r998bb06 r4035637  
    132132      return 0;
    133133    }
     134
     135    _CPU_ISR_Disable(level);
     136
    134137    if ( (int)rtems_hdl_tbl[irq->name].next_handler  == -1 ) {
     138      _CPU_ISR_Enable(level);
    135139      printk("IRQ vector %d already connected to an unshared handler\n",irq->name);
    136140      return 0;
    137141    }
    138     _CPU_ISR_Disable(level);
    139 
    140142
    141143     vchain = (rtems_irq_connect_data*)malloc(sizeof(rtems_irq_connect_data));
     
    202204     * to get the previous handler before accepting to disconnect.
    203205     */
     206    _CPU_ISR_Disable(level);
    204207    if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) {
     208      _CPU_ISR_Enable(level);
    205209      printk("IRQ vector %d already connected\n",irq->name);
    206210      return 0;
    207211    }
    208     _CPU_ISR_Disable(level);
    209212
    210213    /*
     
    246249int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* irq)
    247250{
     251     unsigned int level;
     252
    248253     if (!isValidInterrupt(irq->name)) {
    249254      return 0;
    250255     }
     256     _CPU_ISR_Disable(level);
    251257     *irq = rtems_hdl_tbl[irq->name];
     258     _CPU_ISR_Enable(level);
    252259     return 1;
    253260}
     
    268275     * to get the previous handler before accepting to disconnect.
    269276     */
     277    _CPU_ISR_Disable(level);
    270278    if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) {
     279      _CPU_ISR_Enable(level);
    271280      return 0;
    272281    }
    273     _CPU_ISR_Disable(level);
    274282
    275283    if( (int)rtems_hdl_tbl[irq->name].next_handler != -1 )
Note: See TracChangeset for help on using the changeset viewer.