mirror of
https://github.com/drasko/codezero.git
synced 2026-01-26 01:33:21 +01:00
Revised task initialisation, revising mmap yet.
This commit is contained in:
@@ -16,7 +16,13 @@
|
||||
|
||||
#define __TASKNAME__ __PAGERNAME__
|
||||
|
||||
#define TASK_OFILES_MAX 32
|
||||
#define TASK_FILES_MAX 32
|
||||
|
||||
/* POSIX minimum is 4Kb */
|
||||
#define DEFAULT_ENV_SIZE SZ_16KB
|
||||
#define DEFAULT_STACK_SIZE SZ_16KB
|
||||
#define DEFAULT_UTCB_SIZE PAGE_SIZE
|
||||
|
||||
|
||||
struct vm_file;
|
||||
|
||||
@@ -26,13 +32,6 @@ 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 */
|
||||
@@ -67,22 +66,17 @@ struct tcb {
|
||||
/* UTCB address */
|
||||
unsigned long utcb_address;
|
||||
|
||||
/* Task's private files */
|
||||
struct proc_files proc_files;
|
||||
|
||||
/* Virtual memory areas */
|
||||
struct list_head vm_area_list;
|
||||
|
||||
/* File descriptors for this task */
|
||||
struct file_descriptor fd[TASK_OFILES_MAX];
|
||||
struct file_descriptor fd[TASK_FILES_MAX];
|
||||
};
|
||||
|
||||
struct tcb *find_task(int tid);
|
||||
|
||||
struct initdata;
|
||||
void init_pm(struct initdata *initdata);
|
||||
int start_init_tasks(struct initdata *initdata);
|
||||
void dump_tasks(void);
|
||||
|
||||
void send_task_data(l4id_t requester);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user