Prepare to reimplement copy-on-write. previous commit stable.

This commit is contained in:
Bahadir Balban
2008-03-01 15:15:36 +00:00
parent 4f346cea53
commit e2e6c89da2
5 changed files with 24 additions and 9 deletions

View File

@@ -1,6 +0,0 @@
#ifndef __MM0_ENV__
#define __MM0_ENV__
int task_prepare_environment(struct tcb *t);
#endif

13
tasks/mm0/include/proc.h Normal file
View File

@@ -0,0 +1,13 @@
#ifndef __MM0_PROC__
#define __MM0_PROC__
struct proc_files {
struct vm_file *stackfile; /* ZI, private, devzero, then autogenerated */
struct vm_file *envfile; /* NON-ZI, private, autogenerated, then autogenerated */
struct vm_file *datafile; /* NON-ZI, private, real file, then autogenerated */
struct vm_file *bssfile; /* ZI private, devzero, then autogenerated */
};
int task_prepare_procfiles(struct tcb *t);
#endif

View File

@@ -29,6 +29,13 @@ struct file_descriptor {
struct vm_file *vmfile;
};
struct proc_files {
struct vm_file *stackfile; /* ZI, private, devzero, then autogenerated */
struct vm_file *envfile; /* NON-ZI, private, autogenerated, then autogenerated */
struct vm_file *datafile; /* NON-ZI, private, real file, then autogenerated */
struct vm_file *bssfile; /* ZI private, devzero, then autogenerated */
};
/* Stores all task information that can be kept in userspace. */
struct tcb {
/* Task list */
@@ -63,8 +70,8 @@ struct tcb {
/* UTCB address */
unsigned long utcb_address;
/* Per-task environment file */
struct vm_file *env_file;
/* Task's private files */
struct proc_files proc_files;
/* Virtual memory areas */
struct list_head vm_area_list;

View File

@@ -22,6 +22,7 @@
#include <string.h>
#include <file.h>
#include <task.h>
#include <proc.h>
struct envdata {
struct list_head list;

View File

@@ -24,7 +24,7 @@
#include <memory.h>
#include <file.h>
#include <utcb.h>
#include <env.h>
#include <proc.h>
struct tcb_head {
struct list_head list;