summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorVineet Gupta <Vineet.Gupta1@synopsys.com>2015-02-14 15:25:41 +0530
committerWaldemar Brodkorb <wbx@openadk.org>2015-02-16 06:24:16 +0100
commit9846f0a881815b87cf1eac8919739fb60e293c57 (patch)
tree33b844e0f662d719292fe22ae84a5541da0fb410 /libc
parent8c305a573e43d9e1b8d3c232cbd867e042e1a45c (diff)
ARC: siagction: opencode memcpy
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/arc/sigaction.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/arc/sigaction.c b/libc/sysdeps/linux/arc/sigaction.c
index 73c496d2a..a34c7cf4c 100644
--- a/libc/sysdeps/linux/arc/sigaction.c
+++ b/libc/sysdeps/linux/arc/sigaction.c
@@ -22,8 +22,9 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
struct sigaction kact;
- /* !act means caller only wants to know @oact
- * Hence only otherwise, do SA_RESTORER stuff
+ /*
+ * SA_RESTORER is only relevant for act != NULL case
+ * (!act means caller only wants to know @oact)
*
* For the normal/default cases (user not providing SA_RESTORER) use
* a real sigreturn stub to avoid kernel synthesizing one on user stack
@@ -31,9 +32,11 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
* update) and costly cache line flushes for code modification
*/
if (act && !(act->sa_flags & SA_RESTORER)) {
- memcpy(&kact, act, sizeof(kact));
kact.sa_restorer = __default_rt_sa_restorer;
- kact.sa_flags |= SA_RESTORER;
+ kact.sa_flags = act->sa_flags | SA_RESTORER;
+
+ kact.sa_handler = act->sa_handler;
+ kact.sa_mask = act->sa_mask;
act = &kact;
}