Example #1
0
void test_server()
{
	int threadID;
	static char test_clone_stack[10][4096];
	
	//seL4_TCB_UnbindAEP(REFOS_THREAD_TCB);
	
	threadID = proc_clone(test_thread, &test_clone_stack[0][4096], 0, 0);
	timer_server_mainloop();
}
Example #2
0
static void sched_task_fork(struct process *parent)
{
    struct process *child = proc_clone(parent);
    if (child)
    {
        parent->syscall_retvalue = (uint32_t)child->pid;
        child->syscall_retvalue = 0;
    }
    else
    {
        parent->syscall_retvalue = (uint32_t)-1;
    }
}
Example #3
0
int
proc_clone_internal_handler(void *rpc_userptr , seL4_Word rpc_entryPoint , seL4_Word rpc_childStack
        , int rpc_flags , seL4_Word rpc_arg , refos_err_t* rpc_errno)
{
    struct proc_pcb *pcb = (struct proc_pcb*) rpc_userptr;
    assert(pcb->magic == REFOS_PCB_MAGIC);

    int threadID = -1;
    printf("before call proc_clone function!\n");
    int error = proc_clone(pcb, &threadID, (vaddr_t) rpc_childStack, (vaddr_t) rpc_entryPoint);
    SET_ERRNO_PTR(rpc_errno, error);
    printf("after call proc_clone function!\n");
    return threadID;
}