Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linux/linux_fork.c
Show First 20 Lines • Show All 293 Lines • ▼ Show 20 Lines | if (error != 0) | ||||
return (EPROCLIM); | return (EPROCLIM); | ||||
} | } | ||||
#endif | #endif | ||||
/* Initialize our td */ | /* Initialize our td */ | ||||
error = kern_thr_alloc(p, 0, &newtd); | error = kern_thr_alloc(p, 0, &newtd); | ||||
if (error) | if (error) | ||||
goto fail; | goto fail; | ||||
cpu_set_upcall(newtd, td); | cpu_copy_thread(newtd, td); | ||||
bzero(&newtd->td_startzero, | bzero(&newtd->td_startzero, | ||||
__rangeof(struct thread, td_startzero, td_endzero)); | __rangeof(struct thread, td_startzero, td_endzero)); | ||||
bcopy(&td->td_startcopy, &newtd->td_startcopy, | bcopy(&td->td_startcopy, &newtd->td_startcopy, | ||||
__rangeof(struct thread, td_startcopy, td_endcopy)); | __rangeof(struct thread, td_startcopy, td_endcopy)); | ||||
newtd->td_proc = p; | newtd->td_proc = p; | ||||
thread_cow_get(newtd, td); | thread_cow_get(newtd, td); | ||||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |