release the resources of the process at exit(2)/exit_group(2).

This commit is contained in:
NAKAMURA Gou
2013-05-28 10:49:33 +09:00
parent 9354c82ee7
commit fa1be382c7
8 changed files with 140 additions and 27 deletions

View File

@ -50,6 +50,7 @@ struct process {
int status;
int cpu_id;
ihk_atomic_t refcount;
struct process_vm *vm;
ihk_mc_kernel_context_t ctx;
@ -73,6 +74,7 @@ struct process_vm {
struct page_table *page_table;
struct list_head vm_range_list;
struct vm_regions region;
struct process *owner_process; /* process that reside on the same page */
// Address space private futexes
struct futex_queue futex_queues[1 << FUTEX_HASHBITS];
@ -90,7 +92,8 @@ struct process_vm {
struct process *create_process(unsigned long user_pc);
struct process *clone_process(struct process *org,
unsigned long pc, unsigned long sp);
void destroy_process(struct process *proc);
void hold_process(struct process *proc);
void free_process(struct process *proc);
void free_process_memory(struct process *proc);
int add_process_memory_range(struct process *process,