git: fa6d9e24f4d5 - stable/13 - linux(4): Microoptimize rt_sendsig(), convert signal mask once
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jun 2022 19:41:25 UTC
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=fa6d9e24f4d5352f0301801d72260fc6b14d7e3c commit fa6d9e24f4d5352f0301801d72260fc6b14d7e3c Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-05-30 16:49:45 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-06-17 19:35:38 +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 (cherry picked from commit c30a767c6fd6d3f19e897fb800513e75175249b9) --- 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 83aa646fee20..8d9557a5aebc 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -575,7 +575,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;