diff options
author | jhb <jhb@FreeBSD.org> | 2006-07-10 21:38:17 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-07-10 21:38:17 +0000 |
commit | cfc179a934e59efac00bc180f5be3a2b057380e2 (patch) | |
tree | 72fc2b0a9892ae5c4b123960773ce52272dcdbf6 /sys/compat/svr4/svr4_util.h | |
parent | ee41eea4035fade747b35dc78c1a1c3458abbf66 (diff) | |
download | FreeBSD-src-cfc179a934e59efac00bc180f5be3a2b057380e2.zip FreeBSD-src-cfc179a934e59efac00bc180f5be3a2b057380e2.tar.gz |
- Split out kern_accept(), kern_getpeername(), and kern_getsockname() for
use by ABI emulators.
- Alter the interface of kern_recvit() somewhat. Specifically, go ahead
and hard code UIO_USERSPACE in the uio as that's what all the callers
specify. In place, add a new uioseg to indicate what type of pointer
is in mp->msg_name. Previously it was always a userland address, but
ABI emulators may pass in kernel-side sockaddrs. Also, remove the
namelenp field and instead require the two places that used it to
explicitly copy mp->msg_namelen out to userland.
- Use the patched kern_recvit() to replace svr4_recvit() and the stock
kern_sendit() to replace svr4_sendit().
- Use kern_bind() instead of stackgap use in ti_bind().
- Use kern_getpeername() and kern_getsockname() instead of stackgap in
svr4_stream_ti_ioctl().
- Use kern_connect() instead of stackgap in svr4_do_putmsg().
- Use kern_getpeername() and kern_accept() instead of stackgap in
svr4_do_getmsg().
- Retire the stackgap from SVR4 compat as it is no longer used.
Diffstat (limited to 'sys/compat/svr4/svr4_util.h')
-rw-r--r-- | sys/compat/svr4/svr4_util.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/sys/compat/svr4/svr4_util.h b/sys/compat/svr4/svr4_util.h index 66902dd..4cbf230 100644 --- a/sys/compat/svr4/svr4_util.h +++ b/sys/compat/svr4/svr4_util.h @@ -47,30 +47,6 @@ #define DPRINTF(a) #endif - -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)(((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; -} - int svr4_emul_find(struct thread *, char *, enum uio_seg, char **, int); #define CHECKALT(td, upath, pathp, i) \ |