linux: implement rt_sigsuspend(2) on arm64

... by making it architecture-independent.

Reviewed By:	dchagin
Sponsored By:	EPSRC
Differential Revision:	https://reviews.freebsd.org/D31259
This commit is contained in:
Edward Tomasz Napierala 2021-07-23 20:11:06 +00:00
parent b7de535288
commit 72f7ddb587
5 changed files with 18 additions and 67 deletions

View File

@ -174,27 +174,6 @@ linux_iopl(struct thread *td, struct linux_iopl_args *args)
return (0);
}
int
linux_rt_sigsuspend(struct thread *td, struct linux_rt_sigsuspend_args *uap)
{
l_sigset_t lmask;
sigset_t sigmask;
int error;
LINUX_CTR2(rt_sigsuspend, "%p, %ld",
uap->newset, uap->sigsetsize);
if (uap->sigsetsize != sizeof(l_sigset_t))
return (EINVAL);
error = copyin(uap->newset, &lmask, sizeof(l_sigset_t));
if (error)
return (error);
linux_to_bsd_sigset(&lmask, &sigmask);
return (kern_sigsuspend(td, sigmask));
}
int
linux_pause(struct thread *td, struct linux_pause_args *args)
{

View File

@ -537,24 +537,6 @@ linux_sigsuspend(struct thread *td, struct linux_sigsuspend_args *args)
return (kern_sigsuspend(td, sigmask));
}
int
linux_rt_sigsuspend(struct thread *td, struct linux_rt_sigsuspend_args *uap)
{
l_sigset_t lmask;
sigset_t sigmask;
int error;
if (uap->sigsetsize != sizeof(l_sigset_t))
return (EINVAL);
error = copyin(uap->newset, &lmask, sizeof(l_sigset_t));
if (error)
return (error);
linux_to_bsd_sigset(&lmask, &sigmask);
return (kern_sigsuspend(td, sigmask));
}
int
linux_pause(struct thread *td, struct linux_pause_args *args)
{

View File

@ -55,7 +55,6 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
/* DTrace probes */
LIN_SDT_PROBE_DEFINE0(machdep, linux_mmap2, todo);
LIN_SDT_PROBE_DEFINE0(machdep, linux_rt_sigsuspend, todo);
LIN_SDT_PROBE_DEFINE0(machdep, linux_sigaltstack, todo);
/*
@ -124,15 +123,6 @@ linux_madvise(struct thread *td, struct linux_madvise_args *uap)
return (linux_madvise_common(td, PTROUT(uap->addr), uap->len, uap->behav));
}
/* LINUXTODO: implement arm64 linux_rt_sigsuspend */
int
linux_rt_sigsuspend(struct thread *td, struct linux_rt_sigsuspend_args *uap)
{
LIN_SDT_PROBE0(machdep, linux_rt_sigsuspend, todo);
return (EDOOFUS);
}
/* LINUXTODO: implement arm64 linux_sigaltstack */
int
linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap)

View File

@ -791,3 +791,21 @@ linux_rt_tgsigqueueinfo(struct thread *td, struct linux_rt_tgsigqueueinfo_args *
return (linux_do_tkill(td, tds, &ksi));
}
int
linux_rt_sigsuspend(struct thread *td, struct linux_rt_sigsuspend_args *uap)
{
l_sigset_t lmask;
sigset_t sigmask;
int error;
if (uap->sigsetsize != sizeof(l_sigset_t))
return (EINVAL);
error = copyin(uap->newset, &lmask, sizeof(l_sigset_t));
if (error != 0)
return (error);
linux_to_bsd_sigset(&lmask, &sigmask);
return (kern_sigsuspend(td, sigmask));
}

View File

@ -505,24 +505,6 @@ linux_sigsuspend(struct thread *td, struct linux_sigsuspend_args *args)
return (kern_sigsuspend(td, sigmask));
}
int
linux_rt_sigsuspend(struct thread *td, struct linux_rt_sigsuspend_args *uap)
{
l_sigset_t lmask;
sigset_t sigmask;
int error;
if (uap->sigsetsize != sizeof(l_sigset_t))
return (EINVAL);
error = copyin(uap->newset, &lmask, sizeof(l_sigset_t));
if (error)
return (error);
linux_to_bsd_sigset(&lmask, &sigmask);
return (kern_sigsuspend(td, sigmask));
}
int
linux_pause(struct thread *td, struct linux_pause_args *args)
{