Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linux/linux_fork.c
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | linux_fork(struct thread *td, struct linux_fork_args *args) | ||||
td->td_retval[0] = p2->p_pid; | td->td_retval[0] = p2->p_pid; | ||||
/* | /* | ||||
* Make this runnable after we are finished with it. | * Make this runnable after we are finished with it. | ||||
*/ | */ | ||||
thread_lock(td2); | thread_lock(td2); | ||||
TD_SET_CAN_RUN(td2); | TD_SET_CAN_RUN(td2); | ||||
sched_add(td2, SRQ_BORING); | sched_add(td2, SRQ_BORING); | ||||
thread_unlock(td2); | |||||
return (0); | return (0); | ||||
} | } | ||||
int | int | ||||
linux_vfork(struct thread *td, struct linux_vfork_args *args) | linux_vfork(struct thread *td, struct linux_vfork_args *args) | ||||
{ | { | ||||
struct fork_req fr; | struct fork_req fr; | ||||
Show All 14 Lines | linux_vfork(struct thread *td, struct linux_vfork_args *args) | ||||
td->td_retval[0] = p2->p_pid; | td->td_retval[0] = p2->p_pid; | ||||
/* | /* | ||||
* Make this runnable after we are finished with it. | * Make this runnable after we are finished with it. | ||||
*/ | */ | ||||
thread_lock(td2); | thread_lock(td2); | ||||
TD_SET_CAN_RUN(td2); | TD_SET_CAN_RUN(td2); | ||||
sched_add(td2, SRQ_BORING); | sched_add(td2, SRQ_BORING); | ||||
thread_unlock(td2); | |||||
return (0); | return (0); | ||||
} | } | ||||
#endif | #endif | ||||
static int | static int | ||||
linux_clone_proc(struct thread *td, struct linux_clone_args *args) | linux_clone_proc(struct thread *td, struct linux_clone_args *args) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | linux_clone_proc(struct thread *td, struct linux_clone_args *args) | ||||
} | } | ||||
/* | /* | ||||
* Make this runnable after we are finished with it. | * Make this runnable after we are finished with it. | ||||
*/ | */ | ||||
thread_lock(td2); | thread_lock(td2); | ||||
TD_SET_CAN_RUN(td2); | TD_SET_CAN_RUN(td2); | ||||
sched_add(td2, SRQ_BORING); | sched_add(td2, SRQ_BORING); | ||||
thread_unlock(td2); | |||||
td->td_retval[0] = p2->p_pid; | td->td_retval[0] = p2->p_pid; | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
linux_clone_thread(struct thread *td, struct linux_clone_args *args) | linux_clone_thread(struct thread *td, struct linux_clone_args *args) | ||||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
/* | /* | ||||
* Make this runnable after we are finished with it. | * Make this runnable after we are finished with it. | ||||
*/ | */ | ||||
thread_lock(newtd); | thread_lock(newtd); | ||||
TD_SET_CAN_RUN(newtd); | TD_SET_CAN_RUN(newtd); | ||||
sched_add(newtd, SRQ_BORING); | sched_add(newtd, SRQ_BORING); | ||||
thread_unlock(newtd); | |||||
td->td_retval[0] = newtd->td_tid; | td->td_retval[0] = newtd->td_tid; | ||||
return (0); | return (0); | ||||
fail: | fail: | ||||
#ifdef RACCT | #ifdef RACCT | ||||
if (racct_enable) { | if (racct_enable) { | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |