Changeset 712c4ba in mainline for kernel/genarch/src/drivers/ega/ega.c
- Timestamp:
- 2011-05-20T16:09:24Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b6f3e7e
- Parents:
- 326bf65
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/ega/ega.c
r326bf65 r712c4ba 40 40 #include <mm/as.h> 41 41 #include <mm/slab.h> 42 #include <synch/mutex.h> 42 43 #include <arch/mm/page.h> 43 #include <synch/spinlock.h>44 44 #include <typedefs.h> 45 45 #include <arch/asm.h> … … 63 63 64 64 typedef struct { 65 IRQ_SPINLOCK_DECLARE(lock);65 mutex_t mtx; 66 66 67 67 uint32_t cursor; … … 540 540 ega_instance_t *instance = (ega_instance_t *) dev->data; 541 541 542 irq_spinlock_lock(&instance->lock, true);542 mutex_lock(&instance->mtx); 543 543 544 544 switch (ch) { … … 563 563 ega_move_cursor(instance, silent); 564 564 565 irq_spinlock_unlock(&instance->lock, true);565 mutex_unlock(&instance->mtx); 566 566 } 567 567 … … 570 570 ega_instance_t *instance = (ega_instance_t *) dev->data; 571 571 572 irq_spinlock_lock(&instance->lock, true);572 mutex_lock(&instance->mtx); 573 573 574 574 memcpy(instance->addr, instance->backbuf, EGA_VRAM_SIZE); … … 576 576 ega_show_cursor(instance, silent); 577 577 578 irq_spinlock_unlock(&instance->lock, true);578 mutex_unlock(&instance->mtx); 579 579 } 580 580 … … 594 594 egadev->data = instance; 595 595 596 irq_spinlock_initialize(&instance->lock, "*ega.instance.lock");596 mutex_initialize(&instance->mtx, MUTEX_PASSIVE); 597 597 598 598 instance->base = base;
Note:
See TracChangeset
for help on using the changeset viewer.