--- /dev/null
+#ifndef __CORAX_PROCESS_H
+#define __CORAX_PROCESS_H
+
+struct process {
+
+};
+
+#endif /* __CORAX_PROCESS_H */
#include <corax/heap.h>
#include <arch.h>
#include <debug.h>
+#include <process.h>
#include "paging.h"
#include "cpu.h"
u32_t p_privl;
};
-void foo(void)
-{
- for(;;);
-
- return;
-}
-
-extern int _pg_dir_vpxlate(pg_dir_t*, u32_t, u32_t*);
-
-int process_create(process_t **dst, u32_t ppl)
+int process_create(process_t **dst, u32_t ppl, void *entry)
{
int ret_val;
process_t *proc;
proc->p_privl = ppl;
- task_prepare(proc->p_tasks, (u32_t)pdbr, (u32_t)foo,
+ task_prepare(proc->p_tasks, (u32_t)pdbr, (u32_t)entry,
(u32_t)kstack, (u32_t)ustack + PAGE_SIZE, ppl);
proc->p_tasks->t_sp = (u32_t)(CONFIG_KERNEL_STACK_BASE +
#include <corax/types.h>
-typedef struct process process_t;
-
struct task {
u32_t t_sp;
u32_t t_pgdir;
u32_t cpu_set_pstate(int pstate);
-int process_create(process_t**, u32_t);
-
int task_prepare(struct task*, u32_t cr3, u32_t eip, u32_t esp0, u32_t esp, u32_t priv);
int task_switch(struct task*);