Changeset 1068f6a in mainline for genarch/src/mm/as_ht.c


Ignore:
Timestamp:
2006-05-20T19:32:06Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c1982e45
Parents:
9ea6cc5
Message:

Turn address space lock, address space area lock and
page_ht_lock into mutexes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • genarch/src/mm/as_ht.c

    r9ea6cc5 r1068f6a  
    4040#include <memstr.h>
    4141#include <adt/hash_table.h>
    42 #include <synch/spinlock.h>
     42#include <synch/mutex.h>
    4343
    4444static pte_t *ht_create(int flags);
     
    6767        if (flags & FLAG_AS_KERNEL) {
    6868                hash_table_create(&page_ht, PAGE_HT_ENTRIES, 2, &ht_operations);
     69                mutex_initialize(&page_ht_lock);
    6970        }
    7071        return NULL;
     
    8283{
    8384        if (lock)
    84                 spinlock_lock(&as->lock);
    85         spinlock_lock(&page_ht_lock);
     85                mutex_lock(&as->lock);
     86        mutex_lock(&page_ht_lock);
    8687}
    8788
     
    9697void ht_unlock(as_t *as, bool unlock)
    9798{
    98         spinlock_unlock(&page_ht_lock);
     99        mutex_unlock(&page_ht_lock);
    99100        if (unlock)
    100                 spinlock_unlock(&as->lock);
     101                mutex_unlock(&as->lock);
    101102}
Note: See TracChangeset for help on using the changeset viewer.