Task initally exec'ing with success. Some errors need to be investigated.

- Directory creation, file read/write is OK.
- Cannot reuse old task's fds. They are not recycled for some reason.
- Problems with fork/clone/exit. They fail for a reason.
This commit is contained in:
Bahadir Balban
2008-12-01 13:53:50 +02:00
parent 783b1e025f
commit 05d8438f34
14 changed files with 239 additions and 79 deletions

View File

@@ -7,9 +7,7 @@
#ifndef __EXIT_H__
#define __EXIT_H__
#define EXIT_THREAD_DESTROY (1 << 0)
#define EXIT_UNMAP_ALL_SPACE (1 << 1)
void do_exit(struct tcb *task, int status);
int execve_recycle_task(struct tcb *task);
void do_exit(struct tcb *task, unsigned int flags, int status);
#endif /* __EXIT_H__ */

View File

@@ -25,7 +25,7 @@
/* POSIX minimum is 4Kb */
#define DEFAULT_ENV_SIZE SZ_4K
#define DEFAULT_STACK_SIZE SZ_16K
#define DEFAULT_STACK_SIZE SZ_32K
#define DEFAULT_UTCB_SIZE PAGE_SIZE
#define TCB_NO_SHARING 0
@@ -94,8 +94,6 @@ struct tcb {
unsigned long stack_end;
unsigned long heap_start;
unsigned long heap_end;
unsigned long env_start;
unsigned long env_end;
unsigned long args_start;
unsigned long args_end;
@@ -122,7 +120,8 @@ struct tcb *find_task(int tid);
void global_add_task(struct tcb *task);
void global_remove_task(struct tcb *task);
void task_map_prefault_utcb(struct tcb *mapper, struct tcb *owner);
int task_mmap_segments(struct tcb *task, struct vm_file *file, struct exec_file_desc *efd);
int task_mmap_segments(struct tcb *task, struct vm_file *file, struct exec_file_desc *efd,
struct args_struct *args, struct args_struct *env);
int task_setup_registers(struct tcb *task, unsigned int pc,
unsigned int sp, l4id_t pager);
struct tcb *tcb_alloc_init(unsigned int flags);