1 /* Return codes: 1 - ok, 0 - ignore, other - error. */
2 static int
arch_get_scno(struct tcb * tcp)3 arch_get_scno(struct tcb *tcp)
4 {
5 	unsigned int currpers;
6 
7 #ifdef __tilepro__
8 	currpers = 1;
9 #else
10 # ifndef PT_FLAGS_COMPAT
11 #  define PT_FLAGS_COMPAT 0x10000  /* from Linux 3.8 on */
12 # endif
13 	if (tile_regs.flags & PT_FLAGS_COMPAT)
14 		currpers = 1;
15 	else
16 		currpers = 0;
17 #endif
18 	update_personality(tcp, currpers);
19 	tcp->scno = tile_regs.regs[10];
20 
21 	return 1;
22 }
23