diff options
author | neal <neal> | 2007-12-10 15:18:32 +0000 |
---|---|---|
committer | neal <neal> | 2007-12-10 15:18:32 +0000 |
commit | d9c3f0b253ccbb3153e70a9fcb47c24276044cc1 (patch) | |
tree | 416490d798e02feca854670427bf8aa87e17ed43 /libhurd-mm/anonymous.c | |
parent | d8d392a59e99b945a9e15bfe84a0aa8839cb78b5 (diff) |
2007-12-10 Neal H. Walfield <neal@gnu.org>
* as.c: Don't include <pthread.h>. Include <hurd/mutex.h>.
(free_spaces_lock): Make an ss_mutex_t, not a pthread_mutex_t.
Update users.
* storage.c: Don't include <pthread.h>. Include <hurd/mutex.h>.
(struct storage_desc): Make lock an ss_mutex_t, not a
pthread_mutex_t. Update users.
(storage_descs_lock): Likewise.
* pager.h: Don't include <pthread.h>. Include <hurd/mutex.h>.
(struct pager): Make lock an ss_mutex_t, not a pthread_mutex_t.
Update users.
(pagers_lock): Likewise.
Diffstat (limited to 'libhurd-mm/anonymous.c')
-rw-r--r-- | libhurd-mm/anonymous.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libhurd-mm/anonymous.c b/libhurd-mm/anonymous.c index d4f7b78..4ab6973 100644 --- a/libhurd-mm/anonymous.c +++ b/libhurd-mm/anonymous.c @@ -132,7 +132,7 @@ static bool fault (struct pager *pager, addr_t addr, uintptr_t ip, struct exception_info info) { - assert (pthread_mutex_trylock (&pager->lock) == EBUSY); + assert (! ss_mutex_trylock (&pager->lock)); struct anonymous_pager *anon = (struct anonymous_pager *) pager; @@ -212,9 +212,9 @@ anonymous_pager_alloc (addr_t activity, anon->pager.region.start = addr_chop (PTR_TO_ADDR (addr), PAGESIZE_LOG2); anon->pager.region.count = size >> PAGESIZE_LOG2; - pthread_mutex_lock (&pagers_lock); + ss_mutex_lock (&pagers_lock); bool r = pager_install (&anon->pager); - pthread_mutex_unlock (&pagers_lock); + ss_mutex_unlock (&pagers_lock); if (! r) /* Ooops! There is a region conflict. */ { @@ -228,14 +228,14 @@ anonymous_pager_alloc (addr_t activity, void anonymous_pager_destroy (struct anonymous_pager *anon) { - pthread_mutex_lock (&pagers_lock); + ss_mutex_lock (&pagers_lock); /* Deinstall the pager. */ pager_deinstall (&anon->pager); - pthread_mutex_unlock (&pagers_lock); + ss_mutex_unlock (&pagers_lock); - pthread_mutex_lock (&anon->pager.lock); + ss_mutex_lock (&anon->pager.lock); /* Free the allocated storage. */ hurd_btree_storage_desc_t *storage_descs; |