From owner-svn-src-all@freebsd.org Wed Mar 15 17:11:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75D24D0E4F9; Wed, 15 Mar 2017 17:11:03 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38451DC4; Wed, 15 Mar 2017 17:11:03 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2FHB2gF051351; Wed, 15 Mar 2017 17:11:02 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2FHB1mg051347; Wed, 15 Mar 2017 17:11:01 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703151711.v2FHB1mg051347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Wed, 15 Mar 2017 17:11:01 +0000 (UTC) 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 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2017 17:11:03 -0000 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);