mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-21 15:45:02 +00:00
Retire the stackgap macros from ibcs2 as they are no longer used. Push
the includes of <sys/exec.h> and <sys/sysent.h> down into the only files that now need them.
This commit is contained in:
parent
b4442b2c80
commit
a46a6706c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160241
@ -40,41 +40,9 @@
|
||||
#ifndef _IBCS2_UTIL_H_
|
||||
#define _IBCS2_UTIL_H_
|
||||
|
||||
/*
|
||||
* XXX the inlines have obnoxious prerequisites, only some of which are
|
||||
* included here.
|
||||
*/
|
||||
#include <vm/vm.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <machine/vmparam.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
static __inline caddr_t stackgap_init(void);
|
||||
static __inline void *stackgap_alloc(caddr_t *, size_t);
|
||||
|
||||
static __inline caddr_t
|
||||
stackgap_init()
|
||||
{
|
||||
#define szsigcode (*(curthread->td_proc->p_sysent->sv_szsigcode))
|
||||
return (caddr_t)(PS_STRINGS - szsigcode - SPARE_USRSPACE);
|
||||
}
|
||||
|
||||
static __inline void *
|
||||
stackgap_alloc(sgp, sz)
|
||||
caddr_t *sgp;
|
||||
size_t sz;
|
||||
{
|
||||
void *p = (void *) *sgp;
|
||||
sz = ALIGN(sz);
|
||||
if (*sgp + sz > (caddr_t)(PS_STRINGS - szsigcode))
|
||||
return NULL;
|
||||
*sgp += sz;
|
||||
return p;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_IBCS2
|
||||
#define DPRINTF(a) printf a;
|
||||
#else
|
||||
|
@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/syscallsubr.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/unistd.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
|
@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/imgact.h>
|
||||
#include <sys/kernel.h>
|
||||
|
Loading…
Reference in New Issue
Block a user