Rev 1923 | Rev 1933 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1923 | Rev 1932 | ||
---|---|---|---|
Line 174... | Line 174... | ||
174 | 174 | ||
175 | ipl = interrupts_disable(); |
175 | ipl = interrupts_disable(); |
176 | irq = irq_find_and_lock(inr, devno); |
176 | irq = irq_find_and_lock(inr, devno); |
177 | if (irq) { |
177 | if (irq) { |
178 | if (irq->notif_cfg.answerbox == box) { |
178 | if (irq->notif_cfg.answerbox == box) { |
179 | code_free(irq->notif_cfg.code); |
- | |
180 | irq->notif_cfg.code = NULL; |
179 | irq->notif_cfg.notify = false; |
181 | irq->notif_cfg.answerbox = NULL; |
180 | irq->notif_cfg.answerbox = NULL; |
- | 181 | irq->notif_cfg.code = NULL; |
|
182 | irq->notif_cfg.method = 0; |
182 | irq->notif_cfg.method = 0; |
183 | irq->notif_cfg.counter = 0; |
183 | irq->notif_cfg.counter = 0; |
- | 184 | code_free(irq->notif_cfg.code); |
|
184 | spinlock_unlock(&irq->lock); |
185 | spinlock_unlock(&irq->lock); |
185 | } |
186 | } |
186 | } |
187 | } |
187 | interrupts_restore(ipl); |
188 | interrupts_restore(ipl); |
188 | } |
189 | } |
Line 224... | Line 225... | ||
224 | interrupts_restore(ipl); |
225 | interrupts_restore(ipl); |
225 | code_free(code); |
226 | code_free(code); |
226 | return EEXISTS; |
227 | return EEXISTS; |
227 | } |
228 | } |
228 | 229 | ||
- | 230 | irq->notif_cfg.notify = true; |
|
229 | irq->notif_cfg.answerbox = box; |
231 | irq->notif_cfg.answerbox = box; |
230 | irq->notif_cfg.method = method; |
232 | irq->notif_cfg.method = method; |
231 | irq->notif_cfg.code = code; |
233 | irq->notif_cfg.code = code; |
232 | irq->notif_cfg.counter = 0; |
234 | irq->notif_cfg.counter = 0; |
233 | spinlock_unlock(&irq->lock); |
235 | spinlock_unlock(&irq->lock); |