Deleted Added
full compact
linux_fork.c (346812) linux_fork.c (346832)
1/*-
2 * Copyright (c) 2004 Tim J. Robbins
3 * Copyright (c) 2002 Doug Rabson
4 * Copyright (c) 2000 Marcel Moolenaar
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 13 unchanged lines hidden (view full) ---

22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004 Tim J. Robbins
3 * Copyright (c) 2002 Doug Rabson
4 * Copyright (c) 2000 Marcel Moolenaar
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 13 unchanged lines hidden (view full) ---

22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: stable/11/sys/compat/linux/linux_fork.c 346812 2019-04-28 09:53:08Z dchagin $");
30__FBSDID("$FreeBSD: stable/11/sys/compat/linux/linux_fork.c 346832 2019-04-28 14:03:32Z dchagin $");
31
32#include "opt_compat.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/imgact.h>
37#include <sys/ktr.h>
38#include <sys/lock.h>

--- 19 unchanged lines hidden (view full) ---

58#include <machine/../linux/linux.h>
59#include <machine/../linux/linux_proto.h>
60#endif
61#include <compat/linux/linux_emul.h>
62#include <compat/linux/linux_futex.h>
63#include <compat/linux/linux_misc.h>
64#include <compat/linux/linux_util.h>
65
31
32#include "opt_compat.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/imgact.h>
37#include <sys/ktr.h>
38#include <sys/lock.h>

--- 19 unchanged lines hidden (view full) ---

58#include <machine/../linux/linux.h>
59#include <machine/../linux/linux_proto.h>
60#endif
61#include <compat/linux/linux_emul.h>
62#include <compat/linux/linux_futex.h>
63#include <compat/linux/linux_misc.h>
64#include <compat/linux/linux_util.h>
65
66#ifdef LINUX_LEGACY_SYSCALLS
66int
67linux_fork(struct thread *td, struct linux_fork_args *args)
68{
69 struct fork_req fr;
70 int error;
71 struct proc *p2;
72 struct thread *td2;
73

--- 55 unchanged lines hidden (view full) ---

129 */
130 thread_lock(td2);
131 TD_SET_CAN_RUN(td2);
132 sched_add(td2, SRQ_BORING);
133 thread_unlock(td2);
134
135 return (0);
136}
67int
68linux_fork(struct thread *td, struct linux_fork_args *args)
69{
70 struct fork_req fr;
71 int error;
72 struct proc *p2;
73 struct thread *td2;
74

--- 55 unchanged lines hidden (view full) ---

130 */
131 thread_lock(td2);
132 TD_SET_CAN_RUN(td2);
133 sched_add(td2, SRQ_BORING);
134 thread_unlock(td2);
135
136 return (0);
137}
138#endif
137
138static int
139linux_clone_proc(struct thread *td, struct linux_clone_args *args)
140{
141 struct fork_req fr;
142 int error, ff = RFPROC | RFSTOPPED;
143 struct proc *p2;
144 struct thread *td2;

--- 346 unchanged lines hidden ---
139
140static int
141linux_clone_proc(struct thread *td, struct linux_clone_args *args)
142{
143 struct fork_req fr;
144 int error, ff = RFPROC | RFSTOPPED;
145 struct proc *p2;
146 struct thread *td2;

--- 346 unchanged lines hidden ---