1 static int arch_set_error(struct tcb * tcp)2arch_set_error(struct tcb *tcp) 3 { 4 ppc_regs.gpr[3] = tcp->u_error; 5 #ifdef HAVE_GETREGS_OLD 6 return upoke(tcp->pid, sizeof(long) * (PT_R0 + 3), ppc_regs.gpr[3]); 7 #else 8 return set_regs(tcp->pid); 9 #endif 10 } 11 12 static int arch_set_success(struct tcb * tcp)13arch_set_success(struct tcb *tcp) 14 { 15 ppc_regs.gpr[3] = tcp->u_rval; 16 ppc_regs.ccr &= ~0x10000000; 17 #ifdef HAVE_GETREGS_OLD 18 return upoke(tcp->pid, sizeof(long) * PT_CCR, ppc_regs.ccr) || 19 upoke(tcp->pid, sizeof(long) * (PT_R0 + 3), ppc_regs.gpr[3]); 20 #else 21 return set_regs(tcp->pid); 22 #endif 23 } 24