source: multiio/pcmmio/j.diff @ 0ecf946

Last change on this file since 0ecf946 was 13bdbee, checked in by Joel Sherrill <joel.sherrill@…>, on 03/17/11 at 15:04:30

Initial import.

  • Property mode set to 100644
File size: 1.5 KB
  • mio_io_rtems.c

    RCS file: /home/CVS-Mitre/pcmmio-rtems/mio_io_rtems.c,v
    retrieving revision 1.10
    diff -u -r1.10 mio_io_rtems.c
     
    663681      #endif
    664682
    665683      /*
    666        * Buffer the interrupt
    667        *
    668        * NOTE: No need to worry about disabling interrupts,
    669        *       we are in interrupts.
     684       * Ensure there is space to buffer the interrupt
    670685       */
     686      if ( inptr == (outptr-1) || ((inptr == MAX_INTS) && outptr == 0)) {
     687        pcmmio_dio_missed_interrupts++;
    671688
    672       int_buffer[inptr].timestamp = rdtsc();
    673       int_buffer[inptr].line = int_num;
    674       inptr++;
    675       if (inptr == MAX_INTS)
    676         inptr = 0;
     689        /* Clear the interrupt */
     690        clr_int(int_num);
     691        /* at last slot */
     692      } else {
     693        /*
     694         * Buffer the interrupt
     695         *
     696         * NOTE: No need to worry about disabling interrupts,
     697         *       we are in interrupts.
     698         */
     699        int_buffer[inptr].timestamp = rdtsc();
     700        int_buffer[inptr].line = int_num;
     701        inptr++;
     702        if (inptr == MAX_INTS)
     703          inptr = 0;
    677704
    678       /* Clear the interrupt */
    679       clr_int(int_num);
    680     }
     705        /* Clear the interrupt */
     706        clr_int(int_num);
    681707
    682     /* Wake up anybody waiting for a DIO interrupt */
    683     wake_up_interruptible(&wq_dio);
     708        /* Wake up anybody waiting for a DIO interrupt */
     709        wake_up_interruptible(&wq_dio);
     710      }
     711    }
    684712  }
    685713
    686714  if (status & 0x10) {
Note: See TracBrowser for help on using the repository browser.