aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/imgact_aout.c
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerJulian Elischer <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commitb40ce4165d5eb3a5de1515245055350ae3dbab8e (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/kern/imgact_aout.c
parent9b36a30ee46a7766f269fe832ef3a2daa2ec04f0 (diff)
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Notes
Notes: svn path=/head/; revision=83366
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r--sys/kern/imgact_aout.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 9aa8b3d7a7cb..3ec8f5fbc8de 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -26,7 +26,7 @@
* $FreeBSD$
*/
-#include "opt_upages.h"
+#include "opt_kstack_pages.h"
#include <sys/param.h>
#include <sys/exec.h>
@@ -250,29 +250,33 @@ exec_aout_imgact(imgp)
* expand_name(), unless the process was setuid/setgid.
*/
int
-aout_coredump(p, vp, limit)
- register struct proc *p;
+aout_coredump(td, vp, limit)
+ register struct thread *td;
register struct vnode *vp;
off_t limit;
{
+ struct proc *p = td->td_proc;
register struct ucred *cred = p->p_ucred;
register struct vmspace *vm = p->p_vmspace;
int error;
- if (ctob(UPAGES + vm->vm_dsize + vm->vm_ssize) >= limit)
+ if (ctob((UAREA_PAGES + KSTACK_PAGES)
+ + vm->vm_dsize + vm->vm_ssize) >= limit)
return (EFAULT);
- fill_kinfo_proc(p, &p->p_addr->u_kproc);
- error = cpu_coredump(p, vp, cred);
+ fill_kinfo_proc(p, &p->p_uarea->u_kproc);
+ error = cpu_coredump(td, vp, cred);
if (error == 0)
- error = vn_rdwr_inchunks(UIO_WRITE, vp, vm->vm_daddr,
- (int)ctob(vm->vm_dsize), (off_t)ctob(UPAGES), UIO_USERSPACE,
- IO_UNIT, cred, (int *) NULL, p);
+ error = vn_rdwr(UIO_WRITE, vp, vm->vm_daddr,
+ (int)ctob(vm->vm_dsize),
+ (off_t)ctob(UAREA_PAGES + KSTACK_PAGES), UIO_USERSPACE,
+ IO_UNIT, cred, (int *) NULL, td);
if (error == 0)
error = vn_rdwr_inchunks(UIO_WRITE, vp,
(caddr_t) trunc_page(USRSTACK - ctob(vm->vm_ssize)),
round_page(ctob(vm->vm_ssize)),
- (off_t)ctob(UPAGES) + ctob(vm->vm_dsize), UIO_USERSPACE,
- IO_UNIT, cred, (int *) NULL, p);
+ (off_t)ctob(UAREA_PAGES + KSTACK_PAGES) +
+ ctob(vm->vm_dsize), UIO_USERSPACE,
+ IO_UNIT, cred, (int *) NULL, td);
return (error);
}