git: c30a767c6fd6 - main - linux(4): Microoptimize rt_sendsig(), convert signal mask once

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Mon, 30 May 2022 17:04:19 UTC
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=c30a767c6fd6d3f19e897fb800513e75175249b9

commit c30a767c6fd6d3f19e897fb800513e75175249b9
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-05-30 16:49:45 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-05-30 16:49:45 +0000

    linux(4): Microoptimize rt_sendsig(), convert signal mask once
    
    On amd64 Linux saves the thread signal mask in both contexts, in the machine
    dependent and in the machine independent. Both contexts are user accessible.
    Convert the mask once, then copy it.
    
    MFC after:              2 weeks
---
 sys/amd64/linux/linux_sysvec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c
index 7aa2cfc1b30e..4cd41b364b95 100644
--- a/sys/amd64/linux/linux_sysvec.c
+++ b/sys/amd64/linux/linux_sysvec.c
@@ -576,7 +576,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
 	/* Save user context. */
 	bzero(&sf, sizeof(sf));
 	bsd_to_linux_sigset(mask, &sf.sf_uc.uc_sigmask);
-	bsd_to_linux_sigset(mask, &sf.sf_uc.uc_mcontext.sc_mask);
+	sf.sf_uc.uc_mcontext.sc_mask = sf.sf_uc.uc_sigmask;
 
 	sf.sf_uc.uc_stack.ss_sp = PTROUT(td->td_sigstk.ss_sp);
 	sf.sf_uc.uc_stack.ss_size = td->td_sigstk.ss_size;