Some more progress on resource management and boot up.

This commit is contained in:
Bahadir Balban
2009-07-29 13:32:38 +03:00
parent 2b0ea24e94
commit dd8f773f10
17 changed files with 950 additions and 86 deletions

View File

@@ -20,8 +20,10 @@
#if defined (__KERNEL__)
#include <l4/lib/spinlock.h>
#include <l4/lib/list.h>
#include <l4/lib/mutex.h>
#include <l4/lib/idpool.h>
#include INC_SUBARCH(mm.h)
/* A simple page table with a reference count */
@@ -33,6 +35,17 @@ struct address_space {
int ktcb_refs;
};
struct address_space_list {
struct link list;
/* Lock for list add/removal */
struct spinlock list_lock;
/* Used when delete/creating spaces */
struct mutex ref_lock;
int count;
};
struct address_space *address_space_create(struct address_space *orig);
void address_space_delete(struct address_space *space);
void address_space_attach(struct ktcb *tcb, struct address_space *space);