void forked_child_thread_entry(void * ptr, unsigned long val) { (void)val; as_activate(); KASSERT(ptr != NULL); struct trapframe * tf = ptr; enter_forked_process(tf); }
// TODO: this is getting pretty sketchy static void run_forked_proc(void *tf, unsigned long junk) { (void) junk; struct trapframe kern_tf; kern_tf = *(struct trapframe *)tf; // TODO: any sync issue with tf? kfree(tf); enter_forked_process(&kern_tf); }