Changes in kernel/genarch/src/drivers/ega/ega.c [da1bafb:a71c158] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/ega/ega.c
rda1bafb ra71c158 42 42 #include <arch/mm/page.h> 43 43 #include <synch/spinlock.h> 44 #include < typedefs.h>44 #include <arch/types.h> 45 45 #include <arch/asm.h> 46 46 #include <memstr.h> 47 #include <str .h>47 #include <string.h> 48 48 #include <console/chardev.h> 49 49 #include <console/console.h> … … 63 63 64 64 typedef struct { 65 IRQ_SPINLOCK_DECLARE(lock);65 SPINLOCK_DECLARE(lock); 66 66 67 67 uint32_t cursor; … … 71 71 } ega_instance_t; 72 72 73 static void ega_putchar(outdev_t * , wchar_t, bool);74 static void ega_redraw(outdev_t * );73 static void ega_putchar(outdev_t *dev, wchar_t ch, bool silent); 74 static void ega_redraw(outdev_t *dev); 75 75 76 76 static outdev_operations_t egadev_ops = { … … 540 540 ega_instance_t *instance = (ega_instance_t *) dev->data; 541 541 542 irq_spinlock_lock(&instance->lock, true); 542 ipl_t ipl = interrupts_disable(); 543 spinlock_lock(&instance->lock); 543 544 544 545 switch (ch) { … … 563 564 ega_move_cursor(instance, silent); 564 565 565 irq_spinlock_unlock(&instance->lock, true); 566 spinlock_unlock(&instance->lock); 567 interrupts_restore(ipl); 566 568 } 567 569 … … 570 572 ega_instance_t *instance = (ega_instance_t *) dev->data; 571 573 572 irq_spinlock_lock(&instance->lock, true); 574 ipl_t ipl = interrupts_disable(); 575 spinlock_lock(&instance->lock); 573 576 574 577 memcpy(instance->addr, instance->backbuf, EGA_VRAM_SIZE); … … 576 579 ega_show_cursor(instance, silent); 577 580 578 irq_spinlock_unlock(&instance->lock, true); 581 spinlock_unlock(&instance->lock); 582 interrupts_restore(ipl); 579 583 } 580 584 … … 594 598 egadev->data = instance; 595 599 596 irq_spinlock_initialize(&instance->lock, "*ega.instance.lock");600 spinlock_initialize(&instance->lock, "*ega_lock"); 597 601 598 602 instance->base = base;
Note:
See TracChangeset
for help on using the changeset viewer.