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