mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Prepare to reimplement copy-on-write. previous commit stable.
This commit is contained in:
@@ -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
13
tasks/mm0/include/proc.h
Normal 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
|
||||
@@ -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;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <string.h>
|
||||
#include <file.h>
|
||||
#include <task.h>
|
||||
#include <proc.h>
|
||||
|
||||
struct envdata {
|
||||
struct list_head list;
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user