mirror of
https://github.com/drasko/codezero.git
synced 2026-09-28 08:10:21 +02: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
|
|
||||||
@@ -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 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. */
|
/* Stores all task information that can be kept in userspace. */
|
||||||
struct tcb {
|
struct tcb {
|
||||||
/* Task list */
|
/* Task list */
|
||||||
@@ -63,8 +70,8 @@ struct tcb {
|
|||||||
/* UTCB address */
|
/* UTCB address */
|
||||||
unsigned long utcb_address;
|
unsigned long utcb_address;
|
||||||
|
|
||||||
/* Per-task environment file */
|
/* Task's private files */
|
||||||
struct vm_file *env_file;
|
struct proc_files proc_files;
|
||||||
|
|
||||||
/* Virtual memory areas */
|
/* Virtual memory areas */
|
||||||
struct list_head vm_area_list;
|
struct list_head vm_area_list;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <file.h>
|
#include <file.h>
|
||||||
#include <task.h>
|
#include <task.h>
|
||||||
|
#include <proc.h>
|
||||||
|
|
||||||
struct envdata {
|
struct envdata {
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <file.h>
|
#include <file.h>
|
||||||
#include <utcb.h>
|
#include <utcb.h>
|
||||||
#include <env.h>
|
#include <proc.h>
|
||||||
|
|
||||||
struct tcb_head {
|
struct tcb_head {
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
|
|||||||
Reference in New Issue
Block a user