Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2014 14:01:46 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r265186 - in user/dchagin/lemul/sys: amd64/linux32 i386/linux
Message-ID:  <201405011401.s41E1kQR073989@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Thu May  1 14:01:45 2014
New Revision: 265186
URL: http://svnweb.freebsd.org/changeset/base/265186

Log:
  Use the BSD_TO_LINUX_SIGNAL() wherever there is no need
  to check the ABI as it is known.

Modified:
  user/dchagin/lemul/sys/amd64/linux32/linux32_machdep.c
  user/dchagin/lemul/sys/amd64/linux32/linux32_sysvec.c
  user/dchagin/lemul/sys/i386/linux/linux_sysvec.c

Modified: user/dchagin/lemul/sys/amd64/linux32/linux32_machdep.c
==============================================================================
--- user/dchagin/lemul/sys/amd64/linux32/linux32_machdep.c	Thu May  1 14:00:47 2014	(r265185)
+++ user/dchagin/lemul/sys/amd64/linux32/linux32_machdep.c	Thu May  1 14:01:45 2014	(r265186)
@@ -1106,9 +1106,7 @@ linux_waitid(struct thread *td, struct l
 	}
 
 	if (args->info != NULL) {
-		sig = siginfo.si_signo;
-		if (siginfo.si_signo <= td->td_proc->p_sysent->sv_sigsize)
-			sig = td->td_proc->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+		sig = BSD_TO_LINUX_SIGNAL(siginfo.si_signo);
 		siginfo_to_lsiginfo(&siginfo, &lsi, sig);
 		error = copyout(&lsi, args->info, sizeof(lsi));
 	}

Modified: user/dchagin/lemul/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- user/dchagin/lemul/sys/amd64/linux32/linux32_sysvec.c	Thu May  1 14:00:47 2014	(r265185)
+++ user/dchagin/lemul/sys/amd64/linux32/linux32_sysvec.c	Thu May  1 14:01:45 2014	(r265186)
@@ -328,9 +328,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo
 	/*
 	 * Build the argument list for the signal handler.
 	 */
-	if (p->p_sysent->sv_sigtbl)
-		if (sig <= p->p_sysent->sv_sigsize)
-			sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+	sig = BSD_TO_LINUX_SIGNAL(sig);
 
 	bzero(&frame, sizeof(frame));
 
@@ -476,9 +474,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t 
 	/*
 	 * Build the argument list for the signal handler.
 	 */
-	if (p->p_sysent->sv_sigtbl)
-		if (sig <= p->p_sysent->sv_sigsize)
-			sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+	sig = BSD_TO_LINUX_SIGNAL(sig);
 
 	bzero(&frame, sizeof(frame));
 

Modified: user/dchagin/lemul/sys/i386/linux/linux_sysvec.c
==============================================================================
--- user/dchagin/lemul/sys/i386/linux/linux_sysvec.c	Thu May  1 14:00:47 2014	(r265185)
+++ user/dchagin/lemul/sys/i386/linux/linux_sysvec.c	Thu May  1 14:01:45 2014	(r265186)
@@ -455,9 +455,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo
 	/*
 	 * Build the argument list for the signal handler.
 	 */
-	if (p->p_sysent->sv_sigtbl)
-		if (sig <= p->p_sysent->sv_sigsize)
-			sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+	sig = BSD_TO_LINUX_SIGNAL(sig);
 
 	bzero(&frame, sizeof(frame));
 
@@ -598,9 +596,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t 
 	/*
 	 * Build the argument list for the signal handler.
 	 */
-	if (p->p_sysent->sv_sigtbl)
-		if (sig <= p->p_sysent->sv_sigsize)
-			sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+	sig = BSD_TO_LINUX_SIGNAL(sig);
 
 	bzero(&frame, sizeof(frame));
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405011401.s41E1kQR073989>