mirror of
https://github.com/drasko/codezero.git
synced 2026-01-13 19:33:15 +01:00
Address space creation/deletion implemented
- Proper releasing of user pmd and pgds when a space is not used. - Proper releasing of task, space ids. - At occasions a starting thread gets bogus SPSR, this needs investigating. - At a very rare occasion arch_setup_new_thread() had a kernel data abort during register copying from one task to another. Needs investigating.
This commit is contained in:
@@ -138,6 +138,7 @@ void add_section_mapping_init(unsigned int paddr, unsigned int vaddr,
|
||||
unsigned int size, unsigned int flags);
|
||||
|
||||
struct address_space;
|
||||
int delete_page_tables(struct address_space *space);
|
||||
int copy_user_tables(struct address_space *new, struct address_space *orig);
|
||||
pgd_table_t *copy_page_tables(pgd_table_t *from);
|
||||
void remap_as_pages(void *vstart, void *vend);
|
||||
|
||||
@@ -56,8 +56,8 @@ struct ktcb {
|
||||
|
||||
/* Thread information */
|
||||
l4id_t tid; /* Global thread id */
|
||||
l4id_t spid; /* Global space id */
|
||||
l4id_t tgid; /* Global thread group id */
|
||||
/* See space for space id */
|
||||
|
||||
/* Flags to indicate various task status */
|
||||
unsigned int flags;
|
||||
@@ -120,7 +120,6 @@ union ktcb_union {
|
||||
static inline void set_task_ids(struct ktcb *task, struct task_ids *ids)
|
||||
{
|
||||
task->tid = ids->tid;
|
||||
task->spid = ids->spid;
|
||||
task->tgid = ids->tgid;
|
||||
}
|
||||
|
||||
@@ -134,6 +133,7 @@ extern struct id_pool *space_id_pool;
|
||||
extern struct id_pool *tgroup_id_pool;
|
||||
|
||||
struct ktcb *tcb_find(l4id_t tid);
|
||||
struct ktcb *tcb_find_by_space(l4id_t tid);
|
||||
void tcb_add(struct ktcb *tcb);
|
||||
void tcb_remove(struct ktcb *tcb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user