Add netbsd32 wrapper for sys_mremap(), compiles, and assuming the mmap()
wrapper is ok, it should work! I presume the kernel knows not to map above 4GB though....
This commit is contained in:
parent
da15c1a71e
commit
e7cd2030cf
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_netbsd.c,v 1.134 2007/12/20 23:03:02 dsl Exp $ */
|
||||
/* $NetBSD: netbsd32_netbsd.c,v 1.135 2008/01/19 22:25:12 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.134 2007/12/20 23:03:02 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.135 2008/01/19 22:25:12 dsl Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_ddb.h"
|
||||
|
@ -1515,6 +1515,27 @@ netbsd32_mmap(struct lwp *l, const struct netbsd32_mmap_args *uap, register_t *r
|
|||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
netbsd32_mremap(struct lwp *l, const struct netbsd32_mremap_args *uap, register_t *retval)
|
||||
{
|
||||
/* {
|
||||
syscallarg(void *) old_address;
|
||||
syscallarg(size_t) old_size;
|
||||
syscallarg(void *) new_address;
|
||||
syscallarg(size_t) new_size;
|
||||
syscallarg(int) flags;
|
||||
} */
|
||||
struct sys_mremap_args ua;
|
||||
|
||||
NETBSD32TOP_UAP(old_address, void);
|
||||
NETBSD32TOX_UAP(old_size, size_t);
|
||||
NETBSD32TOP_UAP(new_address, void);
|
||||
NETBSD32TOX_UAP(new_size, size_t);
|
||||
NETBSD32TO64_UAP(flags);
|
||||
|
||||
return sys_mremap(l, &ua, retval);
|
||||
}
|
||||
|
||||
int
|
||||
netbsd32_lseek(struct lwp *l, const struct netbsd32_lseek_args *uap, register_t *retval)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.64 2007/12/17 20:45:29 dsl Exp $
|
||||
$NetBSD: syscalls.master,v 1.65 2008/01/19 22:25:12 dsl Exp $
|
||||
|
||||
; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
|
||||
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
|
||||
|
@ -658,3 +658,28 @@
|
|||
398 STD { int netbsd32___fhstat40( \
|
||||
netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\
|
||||
netbsd32_statp_t sb); }
|
||||
|
||||
; Asynchronous I/O system calls
|
||||
399 UNIMPL { int sys_aio_cancel(int fildes, struct aiocb *aiocbp); }
|
||||
400 UNIMPL { int sys_aio_error(const struct aiocb *aiocbp); }
|
||||
401 UNIMPL { int sys_aio_fsync(int op, struct aiocb *aiocbp); }
|
||||
402 UNIMPL { int sys_aio_read(struct aiocb *aiocbp); }
|
||||
403 UNIMPL { int sys_aio_return(struct aiocb *aiocbp); }
|
||||
404 UNIMPL { int sys_aio_suspend(const struct aiocb *const *list, \
|
||||
int nent, const struct timespec *timeout); }
|
||||
405 UNIMPL { int sys_aio_write(struct aiocb *aiocbp); }
|
||||
406 UNIMPL { int sys_lio_listio(int mode, struct aiocb *const *list, \
|
||||
int nent, struct sigevent *sig); }
|
||||
|
||||
407 UNIMPL
|
||||
408 UNIMPL
|
||||
409 UNIMPL
|
||||
|
||||
410 UNIMPL { int sys___mount50(const char *type, \
|
||||
const char *path, int flags, void *data, \
|
||||
size_t data_len); }
|
||||
411 STD MPSAFE { netbsd32_voidp netbsd32_mremap( \
|
||||
netbsd32_voidp old_address, \
|
||||
netbsd32_size_t old_size, \
|
||||
netbsd32_voidp new_address, \
|
||||
netbsd32_size_t new_size, int flags); }
|
||||
|
|
Loading…
Reference in New Issue