From: riku.voipio@linaro.org
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, stefanha@redhat.com,
"Miloš Stojanović" <Milos.Stojanovic@rt-rk.com>
Subject: [Qemu-devel] [PULL 12/15] linux-user: add support for rt_tgsigqueueinfo() system call
Date: Wed, 31 May 2017 16:08:24 +0300 [thread overview]
Message-ID: <cf8b8bfc5049c10f70b3a17f66c7d2698a5dcff5.1496234767.git.riku.voipio@linaro.org> (raw)
In-Reply-To: <cover.1496234766.git.riku.voipio@linaro.org>
From: Miloš Stojanović <Milos.Stojanovic@rt-rk.com>
Add a new system call: rt_tgsigqueueinfo().
This system call is similar to rt_sigqueueinfo(), but instead of
sending the signal and data to the whole thread group with the ID
equal to the argument tgid, it sends it to a single thread within
that thread group. The ID of the thread is specified by the tid
argument.
The implementation is based on the rt_sigqueueinfo() in linux-user
mode, where the tid is added as the second argument and the
previous second and third argument become arguments three and four,
respectively.
Signed-off-by: Miloš Stojanović <Milos.Stojanovic@rt-rk.com>
Conflicts:
linux-user/syscall.c
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
linux-user/syscall.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 3373853bb9..925ae11ea6 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -238,6 +238,7 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \
#define __NR_sys_getdents64 __NR_getdents64
#define __NR_sys_getpriority __NR_getpriority
#define __NR_sys_rt_sigqueueinfo __NR_rt_sigqueueinfo
+#define __NR_sys_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo
#define __NR_sys_syslog __NR_syslog
#define __NR_sys_futex __NR_futex
#define __NR_sys_inotify_init __NR_inotify_init
@@ -275,6 +276,8 @@ _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
loff_t *, res, uint, wh);
#endif
_syscall3(int, sys_rt_sigqueueinfo, pid_t, pid, int, sig, siginfo_t *, uinfo)
+_syscall4(int, sys_rt_tgsigqueueinfo, pid_t, pid, pid_t, tid, int, sig,
+ siginfo_t *, uinfo)
_syscall3(int,sys_syslog,int,type,char*,bufp,int,len)
#ifdef __NR_exit_group
_syscall1(int,exit_group,int,error_code)
@@ -8872,6 +8875,19 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = get_errno(sys_rt_sigqueueinfo(arg1, arg2, &uinfo));
}
break;
+ case TARGET_NR_rt_tgsigqueueinfo:
+ {
+ siginfo_t uinfo;
+
+ p = lock_user(VERIFY_READ, arg4, sizeof(target_siginfo_t), 1);
+ if (!p) {
+ goto efault;
+ }
+ target_to_host_siginfo(&uinfo, p);
+ unlock_user(p, arg4, 0);
+ ret = get_errno(sys_rt_tgsigqueueinfo(arg1, arg2, arg3, &uinfo));
+ }
+ break;
#ifdef TARGET_NR_sigreturn
case TARGET_NR_sigreturn:
if (block_signals()) {
--
2.11.0
next prev parent reply other threads:[~2017-05-31 13:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 13:08 [Qemu-devel] [PULL 00/15] Misc linux-user updates riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 01/15] linux-user: call fd_trans_target_to_host_data() for write() riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 02/15] linux-user: fix eventfd riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 03/15] linux-user: fix fadvise64_64() on ppc riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 04/15] linux-user: fix inotify riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 05/15] linux-user: allocate heap memory for execve arguments riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 06/15] linux-user: remove all traces of qemu from /proc/self/cmdline riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 07/15] linux-user: add strace for getuid(), gettid(), getppid(), geteuid() riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 08/15] linux-user: add tkill(), tgkill() and rt_sigqueueinfo() strace riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 09/15] linux-user: fix ssetmask() system call riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 10/15] linux-user: fix mismatch of lock/unlock_user() invocations in rt_sigqueinfo() syscall riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 11/15] linux-user: fix argument type declaration of " riku.voipio
2017-05-31 13:08 ` riku.voipio [this message]
2017-05-31 13:08 ` [Qemu-devel] [PULL 13/15] linux-user: add rt_tgsigqueueinfo() strace riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 14/15] linux-user: fix inconsistent spaces in print_siginfo() output riku.voipio
2017-05-31 13:08 ` [Qemu-devel] [PULL 15/15] linux-user: add strace support for uinfo structure of rt_sigqueueinfo() and rt_tgsigqueueinfo() riku.voipio
2017-06-01 15:39 ` [Qemu-devel] [PULL 00/15] Misc linux-user updates Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf8b8bfc5049c10f70b3a17f66c7d2698a5dcff5.1496234767.git.riku.voipio@linaro.org \
--to=riku.voipio@linaro.org \
--cc=Milos.Stojanovic@rt-rk.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).