Deleted Added
full compact
linux32_machdep.c (165832) linux32_machdep.c (165867)
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

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

24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#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

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

24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/amd64/linux32/linux32_machdep.c 165832 2007-01-06 15:58:34Z netchild $");
32__FBSDID("$FreeBSD: head/sys/amd64/linux32/linux32_machdep.c 165867 2007-01-07 19:00:38Z netchild $");
33
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/systm.h>
37#include <sys/file.h>
38#include <sys/fcntl.h>
39#include <sys/clock.h>
40#include <sys/imgact.h>

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

559
560 error = fork1(td, ff, 0, &p2);
561 if (error)
562 return (error);
563
564 /* create the emuldata */
565 error = linux_proc_init(td, p2->p_pid, args->flags);
566 /* reference it - no need to check this */
33
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/systm.h>
37#include <sys/file.h>
38#include <sys/fcntl.h>
39#include <sys/clock.h>
40#include <sys/imgact.h>

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

559
560 error = fork1(td, ff, 0, &p2);
561 if (error)
562 return (error);
563
564 /* create the emuldata */
565 error = linux_proc_init(td, p2->p_pid, args->flags);
566 /* reference it - no need to check this */
567 em = em_find(p2, EMUL_UNLOCKED);
567 em = em_find(p2, EMUL_DOLOCK);
568 KASSERT(em != NULL, ("clone: emuldata not found.\n"));
569 /* and adjust it */
570 if (args->flags & CLONE_PARENT_SETTID) {
571 if (args->parent_tidptr == NULL) {
572 EMUL_UNLOCK(&emul_lock);
573 return (EINVAL);
574 }
575 error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid));

--- 578 unchanged lines hidden ---
568 KASSERT(em != NULL, ("clone: emuldata not found.\n"));
569 /* and adjust it */
570 if (args->flags & CLONE_PARENT_SETTID) {
571 if (args->parent_tidptr == NULL) {
572 EMUL_UNLOCK(&emul_lock);
573 return (EINVAL);
574 }
575 error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid));

--- 578 unchanged lines hidden ---