• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef S390_FRAME_PTR
2 # define S390_FRAME_PTR s390_frame_ptr
3 #endif
4 #ifndef SIGNAL_FRAMESIZE
5 # define SIGNAL_FRAMESIZE __SIGNAL_FRAMESIZE
6 #endif
7 #ifndef PTR_TYPE
8 # define PTR_TYPE unsigned long
9 #endif
10 
11 static void
arch_sigreturn(struct tcb * tcp)12 arch_sigreturn(struct tcb *tcp)
13 {
14 	PTR_TYPE mask[NSIG_BYTES / sizeof(PTR_TYPE)];
15 	const PTR_TYPE addr = *S390_FRAME_PTR + SIGNAL_FRAMESIZE;
16 
17 	if (umove(tcp, addr, &mask) < 0) {
18 		tprintf("{mask=%#llx}", zero_extend_signed_to_ull(addr));
19 	} else {
20 		tprintsigmask_addr("{mask=", mask);
21 		tprints("}");
22 	}
23 }
24