summaryrefslogtreecommitdiffstats
path: root/sys/compat/ia32/ia32_util.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-08-22 23:19:02 +0000
committerpeter <peter@FreeBSD.org>2003-08-22 23:19:02 +0000
commitaecc3981a1169fa3676a286b94b650a46ddfa3c5 (patch)
tree1617ebd9e194aad856bf4d2bcd011ca61227006c /sys/compat/ia32/ia32_util.h
parente2c08ea16beeb14a7176c4f900824e65a97a90db (diff)
downloadFreeBSD-src-aecc3981a1169fa3676a286b94b650a46ddfa3c5.zip
FreeBSD-src-aecc3981a1169fa3676a286b94b650a46ddfa3c5.tar.gz
Initial sweep at dividing up the generic 32bit-on-64bit kernel support
from the ia32 specific stuff. Some of this still needs to move to the MI freebsd32 area, and some needs to move to the MD area. This is still work-in-progress.
Diffstat (limited to 'sys/compat/ia32/ia32_util.h')
-rw-r--r--sys/compat/ia32/ia32_util.h51
1 files changed, 1 insertions, 50 deletions
diff --git a/sys/compat/ia32/ia32_util.h b/sys/compat/ia32/ia32_util.h
index 64fa293..06f78cf 100644
--- a/sys/compat/ia32/ia32_util.h
+++ b/sys/compat/ia32/ia32_util.h
@@ -37,53 +37,4 @@
#include <sys/sysent.h>
#include <sys/cdefs.h>
-struct ia32_ps_strings {
- u_int32_t ps_argvstr; /* first of 0 or more argument strings */
- int ps_nargvstr; /* the number of argument strings */
- u_int32_t ps_envstr; /* first of 0 or more environment strings */
- int ps_nenvstr; /* the number of environment strings */
-};
-
-#define IA32_USRSTACK ((1ul << 32) - PAGE_SIZE)
-#define IA32_PS_STRINGS (IA32_USRSTACK - sizeof(struct ia32_ps_strings))
-
-static __inline caddr_t stackgap_init(void);
-static __inline void *stackgap_alloc(caddr_t *, size_t);
-
-static __inline caddr_t
-stackgap_init()
-{
-#define szsigcode (*(curproc->p_sysent->sv_szsigcode))
- return (caddr_t)(((caddr_t)IA32_PS_STRINGS) - szsigcode - SPARE_USRSPACE);
-#undef szsigcode
-}
-
-static __inline void *
-stackgap_alloc(sgp, sz)
- caddr_t *sgp;
- size_t sz;
-{
- void *p;
-
- p = (void *) *sgp;
- *sgp += ALIGN(sz);
- return p;
-}
-
-
-extern const char ia32_emul_path[];
-int ia32_emul_find(struct thread *, caddr_t *, const char *, char *,
- char **, int);
-
-#define CHECKALT(p, sgp, path, i) \
- do { \
- int _error; \
- \
- _error = ia32_emul_find(p, sgp, ia32_emul_path, path, \
- &path, i); \
- if (_error == EFAULT) \
- return (_error); \
- } while (0)
-
-#define CHECKALTEXIST(p, sgp, path) CHECKALT((p), (sgp), (path), 0)
-#define CHECKALTCREAT(p, sgp, path) CHECKALT((p), (sgp), (path), 1)
+#define FREEBSD32_USRSTACK ((1ul << 32) - PAGE_SIZE)
OpenPOWER on IntegriCloud