-int
-sbrk(__unused struct proc *p, __unused struct sbrk_args *uap, __unused register_t *retval)
-{
- /* Not yet implemented */
- return (ENOTSUP);
-}
-
-int
-sstk(__unused struct proc *p, __unused struct sstk_args *uap, __unused register_t *retval)
-{
- /* Not yet implemented */
- return (ENOTSUP);
-}
-
-
-struct osmmap_args {
- caddr_t addr;
- int len;
- int prot;
- int share;
- int fd;
- long pos;
-};
-
-int
-osmmap(
- struct proc *curp,
- register struct osmmap_args *uap,
- register_t *retval)
-{
- struct mmap_args newargs;
- user_addr_t addr;
- int ret;
-
- if ((uap->share == MAP_SHARED )|| (uap->share == MAP_PRIVATE )) {
- newargs.addr = CAST_USER_ADDR_T(uap->addr);
- newargs.len = CAST_USER_ADDR_T(uap->len);
- newargs.prot = uap->prot;
- newargs.flags = uap->share;
- newargs.fd = uap->fd;
- newargs.pos = (off_t)uap->pos;
- ret = mmap(curp, &newargs, &addr);
- if (ret == 0)
- *retval = CAST_DOWN(register_t, addr);
- } else
- ret = EINVAL;
- return ret;
-}
-
+/* XXX the following function should probably be static */
+kern_return_t map_fd_funneled(int, vm_object_offset_t, vm_offset_t *,
+ boolean_t, vm_size_t);