mirror of
https://github.com/drasko/codezero.git
synced 2026-04-03 02:29:06 +02:00
Some more progress on resource management and boot up.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user