report the proper stack size on 32 bit emulations.
This commit is contained in:
parent
2e3ee66dc7
commit
dfdca25ef7
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: procfs_linux.c,v 1.43 2007/11/07 00:23:37 ad Exp $ */
|
/* $NetBSD: procfs_linux.c,v 1.44 2007/11/11 18:29:03 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.43 2007/11/07 00:23:37 ad Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.44 2007/11/11 18:29:03 christos Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -95,11 +95,22 @@ get_proc_size_info(struct lwp *l, unsigned long *stext, unsigned long *etext, un
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef LINUX_USRSTACK32
|
||||||
|
if (strcmp(p->p_emul->e_name, "linux32") == 0 &&
|
||||||
|
LINUX_USRSTACK32 < USRSTACK32)
|
||||||
|
*sstack = (unsigned long)LINUX_USRSTACK32;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
#ifdef LINUX_USRSTACK
|
#ifdef LINUX_USRSTACK
|
||||||
if (strcmp(p->p_emul->e_name, "linux") == 0 &&
|
if (strcmp(p->p_emul->e_name, "linux") == 0 &&
|
||||||
LINUX_USRSTACK < USRSTACK)
|
LINUX_USRSTACK < USRSTACK)
|
||||||
*sstack = (unsigned long)LINUX_USRSTACK;
|
*sstack = (unsigned long)LINUX_USRSTACK;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
|
#ifdef USRSTACK32
|
||||||
|
if (strstr(p->p_emul->e_name, "32") != NULL)
|
||||||
|
*sstack = (unsigned long)USRSTACK32;
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
*sstack = (unsigned long)USRSTACK;
|
*sstack = (unsigned long)USRSTACK;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue