Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c263c77 in mainline for kernel/genarch/src/drivers/ega/ega.c


Ignore:
Timestamp:
2011-05-20T23:12:26Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
0c33b1d5
Parents:
b6f3e7e
Message:

revert poisonous part of changeset mainline,971
(sadly, this reopens #243)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/drivers/ega/ega.c

    rb6f3e7e rc263c77  
    4040#include <mm/as.h>
    4141#include <mm/slab.h>
    42 #include <synch/mutex.h>
    4342#include <arch/mm/page.h>
    4443#include <typedefs.h>
     
    6362
    6463typedef struct {
    65         mutex_t mtx;
     64        IRQ_SPINLOCK_DECLARE(lock);
    6665       
    6766        uint32_t cursor;
     
    540539        ega_instance_t *instance = (ega_instance_t *) dev->data;
    541540       
    542         mutex_lock(&instance->mtx);
     541        irq_spinlock_lock(&instance->lock, true);
    543542       
    544543        switch (ch) {
     
    563562        ega_move_cursor(instance, silent);
    564563       
    565         mutex_unlock(&instance->mtx);
     564        irq_spinlock_unlock(&instance->lock, true);
    566565}
    567566
     
    570569        ega_instance_t *instance = (ega_instance_t *) dev->data;
    571570       
    572         mutex_lock(&instance->mtx);
     571        irq_spinlock_lock(&instance->lock, true);
    573572       
    574573        memcpy(instance->addr, instance->backbuf, EGA_VRAM_SIZE);
     
    576575        ega_show_cursor(instance, silent);
    577576       
    578         mutex_unlock(&instance->mtx);
     577        irq_spinlock_unlock(&instance->lock, true);
    579578}
    580579
     
    594593        egadev->data = instance;
    595594       
    596         mutex_initialize(&instance->mtx, MUTEX_PASSIVE);
     595        irq_spinlock_initialize(&instance->lock, "*ega.instance.lock");
    597596       
    598597        instance->base = base;
Note: See TracChangeset for help on using the changeset viewer.