[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hurd-l4/libhurd-mm storage.c pager.h pager.c ca...
From: |
Neal H. Walfield |
Subject: |
hurd-l4/libhurd-mm storage.c pager.h pager.c ca... |
Date: |
Tue, 27 Nov 2007 15:33:31 +0000 |
CVSROOT: /sources/hurd
Module name: hurd-l4
Changes by: Neal H. Walfield <neal> 07/11/27 15:33:31
Modified files:
libhurd-mm : storage.c pager.h pager.c capalloc.c as.c
anonymous.c ChangeLog
Log message:
2007-11-27 Neal H. Walfield <address@hidden>
* as.c: Include <pthread.h>. Remove dead code.
(free_spaces_lock): New variable.
(free_space_split): Assert that it is held.
(as_alloc): Make thread-safe.
(as_alloc_at): Likewise.
(as_free): Likewise.
(as_alloced_dump): Likewise.
* storage.c: Include <pthread.h> and <atomic.h>.
(free_count): Make a uatomic32_t, rather than an int. Update
users to access it using atomic operations.
(struct storage_desc): New field, lock.
(storage_descs_lock): New global variable.
(link): Assert that STORAGE_DESCS_LOCK is held.
(unlink): Likewise. Don't assert that E->NEXT is NULL, which is
valid.
(slab_space_reserve): Make an atomicptr_t, rather than a void *.
Update users to access it using atomic operations.
(check_slab_space_reserve): Rewrite function to be thread-safe.
(storage_desc_free): Assert that STORAGE_DESCS_LOCK is held.
(storage_alloc): Rewrite function to be thread-safe.
(storage_free): Likewise.
(storage_init): Take STORAGE_DESCS_LOCK. Initialize
SDESC->LOCK.
* capalloc.c: Include <pthread.h>.
(struct cappage_desc): New field, lock.
(unlink): Don't assert E->NEXT.
(cappage_descs_lock): New variable.
(capalloc): Make thread safe.
(capfree): Likewise.
* pager.h: Include <pthread.h>.
(pager_fault_t): Note that PAGER->LOCK will be held.
(struct pager): New field, lock.
(pagers_lock): New declaration.
(pager_install): Note locking requirements.
(pager_relocate): Likewise.
(pager_deinstall): Likewise.
* pager.c (pagers_lock): New definition.
(pager_install): Add asserts.
(pager_relocate): Likewise.
(pager_deinstall): Likewise.
(pager_fault): Likewise. Make function thread-safe.
* anonymous.c (struct storage_desc): Add comment about locking.
(fault): Add assert.
(anonymous_pager_alloc): Take PAGERS_LOCK before calling
pager_install and drop it afterwards.
(anonymous_pager_destroy): Take PAGERS_LOCK before calling
pager_deinstall and drop it afterwards. Take ANON->PAGER.LOCK.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/hurd-l4/libhurd-mm/storage.c?cvsroot=hurd&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/hurd-l4/libhurd-mm/pager.h?cvsroot=hurd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/hurd-l4/libhurd-mm/pager.c?cvsroot=hurd&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/hurd-l4/libhurd-mm/capalloc.c?cvsroot=hurd&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/hurd-l4/libhurd-mm/as.c?cvsroot=hurd&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/hurd-l4/libhurd-mm/anonymous.c?cvsroot=hurd&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/hurd-l4/libhurd-mm/ChangeLog?cvsroot=hurd&r1=1.16&r2=1.17
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- hurd-l4/libhurd-mm storage.c pager.h pager.c ca...,
Neal H. Walfield <=