|
@@ -269,12 +269,13 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
|
|
|
application calling fork. */
|
|
|
if (clone_flags & CLONE_SETTLS)
|
|
|
childti->pcb.unique = regs->r20;
|
|
|
+ else
|
|
|
+ regs->r20 = 0; /* OSF/1 has some strange fork() semantics. */
|
|
|
childti->pcb.usp = usp ?: rdusp();
|
|
|
*childregs = *regs;
|
|
|
childregs->r0 = 0;
|
|
|
childregs->r19 = 0;
|
|
|
childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */
|
|
|
- regs->r20 = 0;
|
|
|
stack = ((struct switch_stack *) regs) - 1;
|
|
|
*childstack = *stack;
|
|
|
childstack->r26 = (unsigned long) ret_from_fork;
|
|
@@ -361,7 +362,7 @@ EXPORT_SYMBOL(dump_elf_task_fp);
|
|
|
* all. -- r~
|
|
|
*/
|
|
|
|
|
|
-unsigned long
|
|
|
+static unsigned long
|
|
|
thread_saved_pc(struct task_struct *t)
|
|
|
{
|
|
|
unsigned long base = (unsigned long)task_stack_page(t);
|