From df28a267da78e6fcf5256e2e6175a2c614a9e1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Sat, 10 Jan 2015 17:44:04 +0000 Subject: [PATCH] changed return type of interrupt handlers --- dma/dma.c | 2 +- include/dma.h | 2 +- include/fec.h | 4 ++-- include/interrupts.h | 4 ++-- net/fec.c | 8 ++++---- sys/interrupts.c | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dma/dma.c b/dma/dma.c index 5ac034d..18d19d2 100644 --- a/dma/dma.c +++ b/dma/dma.c @@ -556,7 +556,7 @@ void dma_free_channel(int requestor) /* * This is the catch-all interrupt handler for the mult-channel DMA */ -int dma_interrupt_handler(void *arg1, void *arg2) +bool dma_interrupt_handler(void *arg1, void *arg2) { int i, interrupts; uint32_t ipl; diff --git a/include/dma.h b/include/dma.h index ad8074f..1b39be6 100644 --- a/include/dma.h +++ b/include/dma.h @@ -37,7 +37,7 @@ extern int dma_set_initiator(int initiator); extern void dma_free_initiator(int initiator); extern void dma_irq_enable(uint8_t lvl, uint8_t pri); extern void dma_irq_disable(void); -extern int dma_interrupt_handler(void *arg1, void *arg2); +extern bool dma_interrupt_handler(void *arg1, void *arg2); #endif /* _DMA_H_ */ diff --git a/include/fec.h b/include/fec.h index 9d0c4bc..3c048fd 100644 --- a/include/fec.h +++ b/include/fec.h @@ -87,8 +87,8 @@ extern int fec1_send(NIF *, uint8_t *, uint8_t *, uint16_t , NBUF *); extern void fec_irq_enable(uint8_t, uint8_t, uint8_t); extern void fec_irq_disable(uint8_t); extern void fec_interrupt_handler(uint8_t); -extern int fec0_interrupt_handler(void *, void *); -extern int fec1_interrupt_handler(void *, void *); +extern bool fec0_interrupt_handler(void *, void *); +extern bool fec1_interrupt_handler(void *, void *); extern void fec_eth_setup(uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t *); extern void fec_eth_reset(uint8_t); extern void fec_eth_stop(uint8_t); diff --git a/include/interrupts.h b/include/interrupts.h index 1b5be71..feca79e 100644 --- a/include/interrupts.h +++ b/include/interrupts.h @@ -147,8 +147,8 @@ extern void isr_init(void); extern bool isr_set_prio_and_level(int int_source, int priority, int level); extern bool isr_enable_int_source(int int_source); -extern bool isr_register_handler(int vector, int level, int priority, int (*handler)(void *, void *), void *hdev, void *harg); -extern void isr_remove_handler(int (*handler)(void *, void *)); +extern bool isr_register_handler(int vector, int level, int priority, bool (*handler)(void *, void *), void *hdev, void *harg); +extern void isr_remove_handler(bool (*handler)(void *, void *)); extern bool isr_execute_handler(int vector); extern int pic_interrupt_handler(void *arg1, void *arg2); extern int xlbpci_interrupt_handler(void *arg1, void *arg2); diff --git a/net/fec.c b/net/fec.c index 7abb16b..10b9d58 100644 --- a/net/fec.c +++ b/net/fec.c @@ -1290,24 +1290,24 @@ static void fec_irq_handler(uint8_t ch) * handler for FEC interrupts * arg2 is a pointer to the nif in this case */ -int fec0_interrupt_handler(void* arg1, void* arg2) +bool fec0_interrupt_handler(void* arg1, void* arg2) { (void) arg1; /* not used */ (void) arg2; fec_irq_handler(0); - return 1; + return true; /* handled */ } -int fec1_interrupt_handler(void* arg1, void* arg2) +bool fec1_interrupt_handler(void* arg1, void* arg2) { (void) arg1; /* not used */ (void) arg2; fec_irq_handler(1); - return 1; + return true; /* handled */ } /* diff --git a/sys/interrupts.c b/sys/interrupts.c index 21c125b..768ee4f 100644 --- a/sys/interrupts.c +++ b/sys/interrupts.c @@ -54,7 +54,7 @@ struct isrentry { int vector; - int (*handler)(void *, void *); + bool (*handler)(void *, void *); void *hdev; void *harg; }; @@ -122,7 +122,7 @@ bool isr_enable_int_source(int int_source) * pointer to the device itself, and the second a pointer to a data * structure used by the device driver for that particular device. */ -bool isr_register_handler(int vector, int level, int priority, int (*handler)(void *, void *), void *hdev, void *harg) +bool isr_register_handler(int vector, int level, int priority, bool (*handler)(void *, void *), void *hdev, void *harg) { int index; int int_source; @@ -173,7 +173,7 @@ bool isr_register_handler(int vector, int level, int priority, int (*handler)(vo return false; /* no available slots */ } -void isr_remove_handler(int (*handler)(void *, void *)) +void isr_remove_handler(bool (*handler)(void *, void *)) { /* * This routine removes from the ISR table all