From d537cf6c8624b27ce2b63431d2f8937f6356f652 Mon Sep 17 00:00:00 2001 From: pbrook Date: Sat, 7 Apr 2007 18:14:41 +0000 Subject: Unify IRQ handling. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/cuda.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'hw/cuda.c') diff --git a/hw/cuda.c b/hw/cuda.c index f3c2b56010..c290450785 100644 --- a/hw/cuda.c +++ b/hw/cuda.c @@ -124,9 +124,7 @@ typedef struct CUDAState { int data_in_index; int data_out_index; - SetIRQFunc *set_irq; - int irq; - void *irq_opaque; + qemu_irq irq; uint8_t autopoll; uint8_t data_in[128]; uint8_t data_out[16]; @@ -145,9 +143,9 @@ static void cuda_timer_update(CUDAState *s, CUDATimer *ti, static void cuda_update_irq(CUDAState *s) { if (s->ifr & s->ier & (SR_INT | T1_INT)) { - s->set_irq(s->irq_opaque, s->irq, 1); + qemu_irq_raise(s->irq); } else { - s->set_irq(s->irq_opaque, s->irq, 0); + qemu_irq_lower(s->irq); } } @@ -630,13 +628,11 @@ static CPUReadMemoryFunc *cuda_read[] = { &cuda_readl, }; -int cuda_init(SetIRQFunc *set_irq, void *irq_opaque, int irq) +int cuda_init(qemu_irq irq) { CUDAState *s = &cuda_state; int cuda_mem_index; - s->set_irq = set_irq; - s->irq_opaque = irq_opaque; s->irq = irq; s->timers[0].index = 0; -- cgit v1.2.3