Changeset 4874c2d in mainline
- Timestamp:
- 2006-10-17T20:32:35Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b14e35f2
- Parents:
- 8513ad7
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/drivers/cuda.c
r8513ad7 r4874c2d 64 64 static volatile uint8_t *cuda = NULL; 65 65 static irq_t cuda_irq; /**< Cuda's IRQ. */ 66 67 static ipc_notif_cfg_t saved_notif_cfg;68 69 66 70 67 static char lchars[0x80] = { … … 255 252 static void cuda_irq_handler(irq_t *irq, void *arg, ...) 256 253 { 257 if (irq->notif_cfg. answerbox)254 if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) 258 255 ipc_irq_send_notif(irq); 259 256 else { … … 277 274 void cuda_grab(void) 278 275 { 279 if (cuda_irq.notif_cfg.answerbox) { 280 saved_notif_cfg = cuda_irq.notif_cfg; 281 cuda_irq.notif_cfg.answerbox = NULL; 282 cuda_irq.notif_cfg.code = NULL; 283 cuda_irq.notif_cfg.method = 0; 284 cuda_irq.notif_cfg.counter = 0; 285 } 276 cuda_irq.notif_cfg.notify = false; 286 277 } 287 278 … … 290 281 void cuda_release(void) 291 282 { 292 if ( saved_notif_cfg.answerbox)293 cuda_irq.notif_cfg = saved_notif_cfg;283 if (cuda_irq.notif_cfg.answerbox) 284 cuda_irq.notif_cfg.notify = true; 294 285 } 295 286 -
kernel/genarch/src/kbd/ns16550.c
r8513ad7 r4874c2d 62 62 static irq_t ns16550_irq; 63 63 64 static ipc_notif_cfg_t saved_notif_cfg;65 66 64 /* 67 65 * These codes read from ns16550 data register are silently ignored. … … 88 86 (void) ns16550_rbr_read(&ns16550); 89 87 90 if (ns16550_irq.notif_cfg.answerbox) { 91 saved_notif_cfg = ns16550_irq.notif_cfg; 92 ns16550_irq.notif_cfg.answerbox = NULL; 93 ns16550_irq.notif_cfg.code = NULL; 94 ns16550_irq.notif_cfg.method = 0; 95 ns16550_irq.notif_cfg.counter = 0; 96 } 88 ns16550_irq.notif_cfg.notify = false; 97 89 } 98 90 … … 100 92 void ns16550_release(void) 101 93 { 102 if ( saved_notif_cfg.answerbox)103 ns16550_irq.notif_cfg = saved_notif_cfg;94 if (ns16550_irq.notif_cfg.answerbox) 95 ns16550_irq.notif_cfg.notify = true; 104 96 } 105 97 … … 184 176 185 177 if (ns16550_lsr_read(&ns16550) & LSR_DATA_READY) { 186 if (ns16550_irq.notif_cfg. answerbox) {178 if (ns16550_irq.notif_cfg.notify && ns16550_irq.notif_cfg.answerbox) { 187 179 /* 188 180 * Send IPC notification. -
kernel/genarch/src/kbd/z8530.c
r8513ad7 r4874c2d 63 63 static irq_t z8530_irq; /**< z8530's IRQ. */ 64 64 65 static ipc_notif_cfg_t saved_notif_cfg;66 67 65 static void z8530_suspend(chardev_t *); 68 66 static void z8530_resume(chardev_t *); … … 92 90 z8530_write_a(&z8530, WR9, WR9_MIE); /* Master Interrupt Enable. */ 93 91 94 if (z8530_irq.notif_cfg.answerbox) { 95 saved_notif_cfg = z8530_irq.notif_cfg; 96 z8530_irq.notif_cfg.answerbox = NULL; 97 z8530_irq.notif_cfg.code = NULL; 98 z8530_irq.notif_cfg.method = 0; 99 z8530_irq.notif_cfg.counter = 0; 100 } 92 z8530_irq.notif_cfg.notify = false; 101 93 } 102 94 … … 104 96 void z8530_release(void) 105 97 { 106 if ( saved_notif_cfg.answerbox)107 z8530_irq.notif_cfg = saved_notif_cfg;98 if (z8530_irq.notif_cfg.answerbox) 99 z8530_irq.notif_cfg.notify = true; 108 100 } 109 101 … … 205 197 * interrupt traps. Process the interrupt directly. 206 198 */ 207 if (irq->notif_cfg. answerbox)199 if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) 208 200 ipc_irq_send_notif(irq); 209 201 else -
kernel/generic/include/ipc/irq.h
r8513ad7 r4874c2d 79 79 */ 80 80 struct ipc_notif_cfg { 81 bool notify; /**< When false, notifications are not sent. */ 81 82 answerbox_t *answerbox; /**< Answerbox for notifications. */ 82 83 unative_t method; /**< Method to be used for the notification. */ -
kernel/generic/src/ipc/irq.c
r8513ad7 r4874c2d 177 177 if (irq) { 178 178 if (irq->notif_cfg.answerbox == box) { 179 code_free(irq->notif_cfg.code); 179 irq->notif_cfg.notify = false; 180 irq->notif_cfg.answerbox = NULL; 180 181 irq->notif_cfg.code = NULL; 181 irq->notif_cfg.answerbox = NULL;182 182 irq->notif_cfg.method = 0; 183 183 irq->notif_cfg.counter = 0; 184 code_free(irq->notif_cfg.code); 184 185 spinlock_unlock(&irq->lock); 185 186 } … … 227 228 } 228 229 230 irq->notif_cfg.notify = true; 229 231 irq->notif_cfg.answerbox = box; 230 232 irq->notif_cfg.method = method;
Note:
See TracChangeset
for help on using the changeset viewer.