#include <arch.h>
#include <debug.h>
#include <process.h>
+#include "sched.h"
struct process {
struct pagedir *p_pgdir;
u32_t p_privl;
};
+extern int sched_enqueue(task_t*);
+
int process_create(process_t **dst, u32_t ppl, void *entry)
{
int ret_val;
proc->p_tasks->t_sp = (u32_t)(CONFIG_KERNEL_STACK_BASE +
((u32_t)proc->p_tasks->t_sp - (u32_t)kstack));
+
+ proc->p_tasks->t_tslice = 50;
+ proc->p_tasks->t_rslice = 50;
+
+ if(sched_enqueue(proc->p_tasks) != 0) {
+ PANIC("sched_enqueue() failed for a new task\n");
+ }
}
cleanup: