Implement trivial conversion for pset_*

This commit is contained in:
martin 2015-06-21 12:54:33 +00:00
parent 44c9bcba16
commit de7fce508e
2 changed files with 65 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32.h,v 1.104 2015/06/20 19:58:40 martin Exp $ */
/* $NetBSD: netbsd32.h,v 1.105 2015/06/21 12:54:33 martin Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@ -157,6 +157,7 @@ typedef netbsd32_pointer_t netbsd32_posix_spawn_file_actionsp;
typedef netbsd32_pointer_t netbsd32_posix_spawnattrp;
typedef netbsd32_pointer_t netbsd32_posix_spawn_file_actions_entryp;
typedef netbsd32_pointer_t netbsd32_pid_tp;
typedef netbsd32_pointer_t netbsd32_psetidp_t;
/*
* now, the compatibility structures and their fake pointer types.

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_netbsd.c,v 1.195 2015/06/16 10:42:38 martin Exp $ */
/* $NetBSD: netbsd32_netbsd.c,v 1.196 2015/06/21 12:54:33 martin Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.195 2015/06/16 10:42:38 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.196 2015/06/21 12:54:33 martin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@ -2798,6 +2798,67 @@ netbsd32_posix_fallocate(struct lwp *l, const struct netbsd32_posix_fallocate_ar
return sys_posix_fallocate(l, &ua, retval);
}
int
netbsd32_pset_create(struct lwp *l,
const struct netbsd32_pset_create_args *uap, register_t *retval)
{
/* {
syscallarg(netbsd32_psetidp_t) psid;
}; */
return sys_pset_create(l, (const void *)uap, retval);
}
int
netbsd32_pset_destroy(struct lwp *l,
const struct netbsd32_pset_destroy_args *uap, register_t *retval)
{
/* {
syscallarg(psetid_t) psid;
}; */
return sys_pset_destroy(l, (const void *)uap, retval);
}
int
netbsd32_pset_assign(struct lwp *l,
const struct netbsd32_pset_assign_args *uap, register_t *retval)
{
/* {
syscallarg(psetid_t) psid;
syscallarg(cpuid_t) cpuid;
syscallarg(netbsd32_psetidp_t) opsid;
}; */
struct sys_pset_assign_args ua;
SCARG(&ua, psid) = SCARG(uap, psid);
NETBSD32TO64_UAP(cpuid);
NETBSD32TOP_UAP(opsid, psetid_t);
return sys_pset_assign(l, &ua, retval);
}
int
netbsd32__pset_bind(struct lwp *l,
const struct netbsd32__pset_bind_args *uap, register_t *retval)
{
/* {
syscallarg(idtype_t) idtype;
syscallarg(id_t) first_id;
syscallarg(id_t) second_id;
syscallarg(psetid_t) psid;
syscallarg(netbsd32_psetidp_t) opsid;
}; */
struct sys__pset_bind_args ua;
SCARG(&ua, idtype) = SCARG(uap, idtype);
SCARG(&ua, first_id) = SCARG(uap, first_id);
SCARG(&ua, second_id) = SCARG(uap, second_id);
SCARG(&ua, psid) = SCARG(uap, psid);
NETBSD32TOP_UAP(opsid, psetid_t);
return sys__pset_bind(l, &ua, retval);
}
/*