about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2015-07-24 23:19:50 -0700
committerChung-Lin Tang <cltang@codesourcery.com>2015-07-24 23:19:50 -0700
commit3f96834346d96c7e31eb00db312832aa933b3a84 (patch)
tree7ba90fcec269057dbe793f9ddf751e9ac5efbed4 /sysdeps/unix/sysv
parent6b183b833968010a95ba41ed307dd8bea7b2e641 (diff)
downloadglibc-3f96834346d96c7e31eb00db312832aa933b3a84.tar.gz
glibc-3f96834346d96c7e31eb00db312832aa933b3a84.tar.xz
glibc-3f96834346d96c7e31eb00db312832aa933b3a84.zip
Fix order of arguments to rt_sigprocmask syscall when setting the signal mask
in setcontext/swapcontext.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/nios2/setcontext.S6
-rw-r--r--sysdeps/unix/sysv/linux/nios2/swapcontext.S6
2 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/nios2/setcontext.S b/sysdeps/unix/sysv/linux/nios2/setcontext.S
index f40b73389d..8d899d950f 100644
--- a/sysdeps/unix/sysv/linux/nios2/setcontext.S
+++ b/sysdeps/unix/sysv/linux/nios2/setcontext.S
@@ -29,10 +29,10 @@ ENTRY(__setcontext)
 	mov	r10, r4
 
 	/* Restore signal mask.  */
-	/* rt_sigprocmask (SIG_SETMASK, NULL, &ucp->uc_sigmask, _NSIG8) */
+	/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */
 	movi	r7, _NSIG8
-	addi	r6, r4, UCONTEXT_SIGMASK
-	mov	r5, zero
+	addi	r5, r4, UCONTEXT_SIGMASK
+	mov	r6, zero
 	movi	r4, SIG_SETMASK
 	movi	r2, SYS_ify (rt_sigprocmask)
 	trap
diff --git a/sysdeps/unix/sysv/linux/nios2/swapcontext.S b/sysdeps/unix/sysv/linux/nios2/swapcontext.S
index c2c321d96a..cfbcf8d256 100644
--- a/sysdeps/unix/sysv/linux/nios2/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/nios2/swapcontext.S
@@ -68,10 +68,10 @@ ENTRY(__swapcontext)
 	bne	r5, r6, .Lsigreturn
 
 	/* Restore signal mask.  */
-	/* rt_sigprocmask (SIG_SETMASK, NULL, &ucp->uc_sigmask, _NSIG8) */
+	/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */
 	movi	r7, _NSIG8
-	addi	r6, r10, UCONTEXT_SIGMASK
-	mov	r5, zero
+	addi	r5, r10, UCONTEXT_SIGMASK
+	mov	r6, zero
 	movi	r4, SIG_SETMASK
 	movi	r2, SYS_ify (rt_sigprocmask)
 	trap