_GLOBAL(ppc32_sigsuspend)
bl .save_nvgprs
bl .sys32_sigsuspend
- b syscall_exit
+ b 70f
_GLOBAL(ppc64_rt_sigsuspend)
bl .save_nvgprs
bl .sys_rt_sigsuspend
- b syscall_exit
+ b 70f
_GLOBAL(ppc32_rt_sigsuspend)
bl .save_nvgprs
bl .sys32_rt_sigsuspend
+ /* If sigsuspend() returns zero, we are going into a signal handler */
+70: cmpdi 0,r3,0
+ beq .ret_from_except
+ /* If it returned -EINTR, we need to return via syscall_exit to set
+ the SO bit in cr0 and potentially stop for ptrace. */
b syscall_exit
_GLOBAL(ppc_fork)
schedule();
if (do_signal32(&saveset, regs))
/*
- * If a signal handler needs to be called,
- * do_signal32() has set R3 to the signal number (the
- * first argument of the signal handler), so don't
- * overwrite that with EINTR !
- * In the other cases, do_signal32() doesn't touch
- * R3, so it's still set to -EINTR (see above).
+ * Returning 0 means we return to userspace via
+ * ret_from_except and thus restore all user
+ * registers from *regs. This is what we need
+ * to do when a signal has been delivered.
*/
- return regs->gpr[3];
+ return 0;
}
}
schedule();
if (do_signal32(&saveset, regs))
/*
- * If a signal handler needs to be called,
- * do_signal32() has set R3 to the signal number (the
- * first argument of the signal handler), so don't
- * overwrite that with EINTR !
- * In the other cases, do_signal32() doesn't touch
- * R3, so it's still set to -EINTR (see above).
+ * Returning 0 means we return to userspace via
+ * ret_from_except and thus restore all user
+ * registers from *regs. This is what we need
+ * to do when a signal has been delivered.
*/
- return regs->gpr[3];
+ return 0;
}
}