Date: Wed, 15 Mar 2017 17:11:01 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315314 - in stable/11/sys: amd64/linux amd64/linux32 compat/linux i386/linux Message-ID: <201703151711.v2FHB1mg051347@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Wed Mar 15 17:11:01 2017 New Revision: 315314 URL: https://svnweb.freebsd.org/changeset/base/315314 Log: MFC r313940: Implement rt_tgsigqueueinfo system call used by glibc for pthread_sigqueue(3). Modified: stable/11/sys/amd64/linux/linux_dummy.c stable/11/sys/amd64/linux32/linux32_dummy.c stable/11/sys/compat/linux/linux_signal.c stable/11/sys/i386/linux/linux_dummy.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/11/sys/amd64/linux/linux_dummy.c Wed Mar 15 17:06:04 2017 (r315313) +++ stable/11/sys/amd64/linux/linux_dummy.c Wed Mar 15 17:11:01 2017 (r315314) @@ -112,7 +112,6 @@ DUMMY(timerfd_gettime); DUMMY(signalfd4); DUMMY(inotify_init1); /* linux 2.6.31: */ -DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.38: */ DUMMY(fanotify_init); Modified: stable/11/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_dummy.c Wed Mar 15 17:06:04 2017 (r315313) +++ stable/11/sys/amd64/linux32/linux32_dummy.c Wed Mar 15 17:11:01 2017 (r315314) @@ -111,7 +111,6 @@ DUMMY(timerfd_gettime); DUMMY(signalfd4); DUMMY(inotify_init1); /* linux 2.6.31: */ -DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.33: */ DUMMY(fanotify_init); Modified: stable/11/sys/compat/linux/linux_signal.c ============================================================================== --- stable/11/sys/compat/linux/linux_signal.c Wed Mar 15 17:06:04 2017 (r315313) +++ stable/11/sys/compat/linux/linux_signal.c Wed Mar 15 17:11:01 2017 (r315314) @@ -764,3 +764,32 @@ linux_rt_sigqueueinfo(struct thread *td, 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)); +} Modified: stable/11/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/11/sys/i386/linux/linux_dummy.c Wed Mar 15 17:06:04 2017 (r315313) +++ stable/11/sys/i386/linux/linux_dummy.c Wed Mar 15 17:11:01 2017 (r315314) @@ -107,7 +107,6 @@ DUMMY(timerfd_gettime); DUMMY(signalfd4); DUMMY(inotify_init1); /* linux 2.6.31: */ -DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.33: */ DUMMY(fanotify_init);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703151711.v2FHB1mg051347>