1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-30 12:04:07 +00:00

Implement rt_tgsigqueueinfo system call used by glibc for pthread_sigqueue(3).

MFC after:	2 week
This commit is contained in:
Dmitry Chagin 2017-02-19 07:38:11 +00:00
parent dab486441f
commit 486a06bdf0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313940
4 changed files with 29 additions and 3 deletions

View File

@ -114,7 +114,6 @@ DUMMY(inotify_init1);
DUMMY(preadv);
DUMMY(pwritev);
/* linux 2.6.31: */
DUMMY(rt_tgsigqueueinfo);
DUMMY(perf_event_open);
/* linux 2.6.38: */
DUMMY(fanotify_init);

View File

@ -114,7 +114,6 @@ DUMMY(inotify_init1);
DUMMY(preadv);
DUMMY(pwritev);
/* linux 2.6.31: */
DUMMY(rt_tgsigqueueinfo);
DUMMY(perf_event_open);
/* linux 2.6.33: */
DUMMY(fanotify_init);

View File

@ -764,3 +764,32 @@ linux_rt_sigqueueinfo(struct thread *td, struct linux_rt_sigqueueinfo_args *args
return (error);
}
int
linux_rt_tgsigqueueinfo(struct thread *td, struct linux_rt_tgsigqueueinfo_args *args)
{
l_siginfo_t linfo;
struct thread *tds;
ksiginfo_t ksi;
int error;
int sig;
if (!LINUX_SIG_VALID(args->sig))
return (EINVAL);
error = copyin(args->uinfo, &linfo, sizeof(linfo));
if (error != 0)
return (error);
if (linfo.lsi_code >= 0)
return (EPERM);
tds = linux_tdfind(td, args->tid, args->tgid);
if (tds == NULL)
return (ESRCH);
sig = linux_to_bsd_signal(args->sig);
ksiginfo_init(&ksi);
lsiginfo_to_ksiginfo(&linfo, &ksi, sig);
return (linux_do_tkill(td, tds, &ksi));
}

View File

@ -110,7 +110,6 @@ DUMMY(inotify_init1);
DUMMY(preadv);
DUMMY(pwritev);
/* linux 2.6.31: */
DUMMY(rt_tgsigqueueinfo);
DUMMY(perf_event_open);
/* linux 2.6.33: */
DUMMY(fanotify_init);