Use __attribute__((no_reorder)) for IRQ interrupts

master
Cameron Cawley 4 years ago committed by Ozkan Sezer
parent b0ea809964
commit d931134313
  1. 4
      src/dos/dosirq.c
  2. 6
      src/dos/dosirq.h
  3. 8
      src/dos/dossb.c

@ -282,7 +282,7 @@ static volatile unsigned int __irq_mask;
static volatile unsigned int __irq_count[16];
#define DECLARE_IRQ_HANDLER(irqno) \
static void INTERRUPT_ATTRIBUTES __irq##irqno##_handler () \
static void INTERRUPT_ATTRIBUTES NO_REORDER __irq##irqno##_handler () \
{ \
if (irq_check (__irqs [irqno]) && __irq_confirm (irqno)) \
{ \
@ -291,7 +291,7 @@ static void INTERRUPT_ATTRIBUTES __irq##irqno##_handler () \
} \
irq_ack (__irqs [irqno]); \
} \
static void __irq##irqno##_end(void) \
static void NO_REORDER __irq##irqno##_end(void) \
{ \
}

@ -17,6 +17,12 @@
#define PIC1_BASE 0x20 /* PIC1 base */
#define PIC2_BASE 0xA0 /* PIC2 base */
#ifdef __GNUC__
#define NO_REORDER __attribute__((no_reorder))
#else
#define NO_REORDER
#endif
#ifdef __WATCOMC__
#define INTERRUPT_ATTRIBUTES __interrupt __far
#else

@ -42,7 +42,7 @@ _func_noclone
inportb(SB_DSP_RESET);
}
static void INTERRUPT_ATTRIBUTES sb_irq()
static void INTERRUPT_ATTRIBUTES NO_REORDER sb_irq()
{
/* Make sure its not a spurious IRQ */
if (!irq_check(sb.irq_handle))
@ -68,7 +68,7 @@ static void INTERRUPT_ATTRIBUTES sb_irq()
sb.timer_callback();
}
static void sb_irq_end()
static void NO_REORDER sb_irq_end()
{
}
@ -109,7 +109,7 @@ static int __sb_irq_irqdetect(int irqno)
return 1;
}
static void INTERRUPT_ATTRIBUTES __sb_irq_dmadetect()
static void INTERRUPT_ATTRIBUTES NO_REORDER __sb_irq_dmadetect()
{
/* Make sure its not a spurious IRQ */
if (!irq_check(sb.irq_handle))
@ -127,7 +127,7 @@ static void INTERRUPT_ATTRIBUTES __sb_irq_dmadetect()
irq_ack(sb.irq_handle);
}
static void __sb_irq_dmadetect_end()
static void NO_REORDER __sb_irq_dmadetect_end()
{
}

Loading…
Cancel
Save