Tue Mar 31 06:03:31 2009 UTC ()
buildfix: NEW_VMCMD(2 -> NEW_VMCMD2(


(cegger)
diff -r1.57 -r1.58 src/sys/compat/darwin/darwin_exec.c

cvs diff -r1.57 -r1.58 src/sys/compat/darwin/Attic/darwin_exec.c (expand / switch to unified diff)

--- src/sys/compat/darwin/Attic/darwin_exec.c 2009/03/29 01:02:49 1.57
+++ src/sys/compat/darwin/Attic/darwin_exec.c 2009/03/31 06:03:31 1.58
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: darwin_exec.c,v 1.57 2009/03/29 01:02:49 mrg Exp $ */ 1/* $NetBSD: darwin_exec.c,v 1.58 2009/03/31 06:03:31 cegger Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2002 The NetBSD Foundation, Inc. 4 * Copyright (c) 2002 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Emmanuel Dreyfus. 8 * by Emmanuel Dreyfus.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */ 32#include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.57 2009/03/29 01:02:49 mrg Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.58 2009/03/31 06:03:31 cegger Exp $");
35 35
36#include "opt_syscall_debug.h" 36#include "opt_syscall_debug.h"
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/proc.h> 40#include <sys/proc.h>
41#include <sys/exec.h> 41#include <sys/exec.h>
42#include <sys/malloc.h> 42#include <sys/malloc.h>
43#include <sys/syscall.h> 43#include <sys/syscall.h>
44#include <sys/sysctl.h> 44#include <sys/sysctl.h>
45#include <sys/conf.h> 45#include <sys/conf.h>
46#include <sys/exec_macho.h> 46#include <sys/exec_macho.h>
47 47
@@ -420,19 +420,19 @@ darwin_exec_setup_stack(struct lwp *l, s @@ -420,19 +420,19 @@ darwin_exec_setup_stack(struct lwp *l, s
420 * arguably, it could be made into one, but that would require the 420 * arguably, it could be made into one, but that would require the
421 * addition of another mapping proc, which is unnecessary 421 * addition of another mapping proc, which is unnecessary
422 */ 422 */
423 access_size = epp->ep_ssize; 423 access_size = epp->ep_ssize;
424 access_linear_min = (u_long)STACK_ALLOC(epp->ep_minsaddr, access_size); 424 access_linear_min = (u_long)STACK_ALLOC(epp->ep_minsaddr, access_size);
425 noaccess_size = max_stack_size - access_size; 425 noaccess_size = max_stack_size - access_size;
426 noaccess_linear_min = (u_long)STACK_ALLOC(STACK_GROW(epp->ep_minsaddr, 426 noaccess_linear_min = (u_long)STACK_ALLOC(STACK_GROW(epp->ep_minsaddr,
427 access_size), noaccess_size); 427 access_size), noaccess_size);
428 if (noaccess_size > 0) { 428 if (noaccess_size > 0) {
429 NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_zero, noaccess_size, 429 NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_zero, noaccess_size,
430 noaccess_linear_min, NULL, 0, VM_PROT_NONE, VMCMD_STACK); 430 noaccess_linear_min, NULL, 0, VM_PROT_NONE, VMCMD_STACK);
431 } 431 }
432 KASSERT(access_size > 0); 432 KASSERT(access_size > 0);
433 NEW_VMCMD(2&epp->ep_vmcmds, vmcmd_map_zero, access_size, 433 NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_zero, access_size,
434 access_linear_min, NULL, 0, VM_PROT_READ | VM_PROT_WRITE, 434 access_linear_min, NULL, 0, VM_PROT_READ | VM_PROT_WRITE,
435 VMCMD_STACK); 435 VMCMD_STACK);
436 436
437 return 0; 437 return 0;
438} 438}