Use sv_psstrings from the current process's sysentvec structure instead

of PS_STRINGS. This is a no-op at present, but it will be needed when
running 32-bit Linux binaries on amd64 to ensure PS_STRINGS is in
addressable memory.
This commit is contained in:
Tim J. Robbins 2004-08-15 11:52:45 +00:00
parent 4ba861fa77
commit 6fa534bad8

View file

@ -53,11 +53,12 @@ static __inline caddr_t stackgap_init(void);
static __inline void *stackgap_alloc(caddr_t *, size_t);
#define szsigcode (*(curthread->td_proc->p_sysent->sv_szsigcode))
#define psstrings (curthread->td_proc->p_sysent->sv_psstrings)
static __inline caddr_t
stackgap_init()
{
return (caddr_t)(PS_STRINGS - szsigcode - SPARE_USRSPACE);
return (caddr_t)(psstrings - szsigcode - SPARE_USRSPACE);
}
static __inline void *
@ -68,7 +69,7 @@ stackgap_alloc(sgp, sz)
void *p = (void *) *sgp;
sz = ALIGN(sz);
if (*sgp + sz > (caddr_t)(PS_STRINGS - szsigcode))
if (*sgp + sz > (caddr_t)(psstrings - szsigcode))
return NULL;
*sgp += sz;
return p;