• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 static void
arch_sigreturn(struct tcb * tcp)2 arch_sigreturn(struct tcb *tcp)
3 {
4 	/* Skip dummy stack frame. */
5 	const unsigned long addr = ppc_regs.gpr[1] + 64;
6 
7 #ifdef POWERPC64
8 	/* The only sigreturn on ppc64 is compat_sys_sigreturn. */
9 	typedef struct {
10 		unsigned int _unused[4];
11 		int signal;
12 		unsigned int handler;
13 		unsigned int oldmask;
14 		/* all the rest is irrelevant */
15 	} sigreturn_context;
16 #else
17 	typedef struct sigcontext sigreturn_context;
18 #endif
19 
20 	sigreturn_context sc;
21 
22 	if (umove(tcp, addr, &sc) < 0) {
23 		tprintf("{mask=%#lx}", addr);
24 	} else {
25 		const unsigned int mask[NSIG_BYTES / sizeof(int)] = {
26 			sc.oldmask,
27 			sc._unused[3]
28 		};
29 
30 		tprintsigmask_addr("{mask=", mask);
31 		tprints("}");
32 	}
33 }
34