Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linux/linux_fork.c
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
#include <machine/../linux/linux.h> | #include <machine/../linux/linux.h> | ||||
#include <machine/../linux/linux_proto.h> | #include <machine/../linux/linux_proto.h> | ||||
#endif | #endif | ||||
#include <compat/linux/linux_emul.h> | #include <compat/linux/linux_emul.h> | ||||
#include <compat/linux/linux_futex.h> | #include <compat/linux/linux_futex.h> | ||||
#include <compat/linux/linux_misc.h> | #include <compat/linux/linux_misc.h> | ||||
#include <compat/linux/linux_util.h> | #include <compat/linux/linux_util.h> | ||||
#ifdef LINUX_LEGACY_SYSCALLS | |||||
int | int | ||||
linux_fork(struct thread *td, struct linux_fork_args *args) | linux_fork(struct thread *td, struct linux_fork_args *args) | ||||
{ | { | ||||
struct fork_req fr; | struct fork_req fr; | ||||
int error; | int error; | ||||
struct proc *p2; | struct proc *p2; | ||||
struct thread *td2; | struct thread *td2; | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | #endif | ||||
*/ | */ | ||||
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); | thread_unlock(td2); | ||||
return (0); | return (0); | ||||
} | } | ||||
#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) | ||||
{ | { | ||||
struct fork_req fr; | struct fork_req fr; | ||||
int error, ff = RFPROC | RFSTOPPED; | int error, ff = RFPROC | RFSTOPPED; | ||||
struct proc *p2; | struct proc *p2; | ||||
struct thread *td2; | struct thread *td2; | ||||
▲ Show 20 Lines • Show All 342 Lines • Show Last 20 Lines |