Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Use round_page() instead of roundup(..., NBPG).
details: https://anonhg.NetBSD.org/src/rev/8004d86ce073
branches: trunk
changeset: 499231:8004d86ce073
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Nov 14 22:13:20 2000 +0000
description:
Use round_page() instead of roundup(..., NBPG).
diffstat:
sys/kern/exec_aout.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 438e485a9ac0 -r 8004d86ce073 sys/kern/exec_aout.c
--- a/sys/kern/exec_aout.c Tue Nov 14 21:55:25 2000 +0000
+++ b/sys/kern/exec_aout.c Tue Nov 14 22:13:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_aout.c,v 1.19 2000/08/01 04:57:28 thorpej Exp $ */
+/* $NetBSD: exec_aout.c,v 1.20 2000/11/14 22:13:20 thorpej Exp $ */
/*
* Copyright (c) 1993, 1994 Christopher G. Demetriou
@@ -38,6 +38,8 @@
#include <sys/exec.h>
#include <sys/resourcevar.h>
+#include <uvm/uvm_extern.h>
+
/*
* exec_aout_makecmds(): Check if it's an a.out-format executable.
*
@@ -167,7 +169,7 @@
VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
/* set up command for bss segment */
- baddr = roundup(epp->ep_daddr + execp->a_data, NBPG);
+ baddr = round_page(epp->ep_daddr + execp->a_data);
bsize = epp->ep_daddr + epp->ep_dsize - baddr;
if (bsize > 0)
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr,
@@ -198,7 +200,7 @@
sizeof(struct exec), VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
/* set up command for bss segment */
- baddr = roundup(epp->ep_daddr + execp->a_data, NBPG);
+ baddr = round_page(epp->ep_daddr + execp->a_data);
bsize = epp->ep_daddr + epp->ep_dsize - baddr;
if (bsize > 0)
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr,
@@ -212,7 +214,7 @@
* Compensate `ep_dsize' for the amount of data covered by the last
* text page.
*/
- dsize = epp->ep_dsize + execp->a_text - roundup(execp->a_text, NBPG);
+ dsize = epp->ep_dsize + execp->a_text - round_page(execp->a_text);
epp->ep_dsize = (dsize > 0) ? dsize : 0;
return exec_aout_setup_stack(p, epp);
}
Home |
Main Index |
Thread Index |
Old Index