File: get_scno.c

package info (click to toggle)
strace 4.15-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 22,752 kB
  • ctags: 9,462
  • sloc: ansic: 62,976; sh: 7,256; makefile: 3,551; perl: 352; awk: 343; lisp: 44; sed: 6
file content (22 lines) | stat: -rw-r--r-- 424 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Return codes: 1 - ok, 0 - ignore, other - error. */
static int
arch_get_scno(struct tcb *tcp)
{
	unsigned int currpers;

#ifdef __tilepro__
	currpers = 1;
#else
# ifndef PT_FLAGS_COMPAT
#  define PT_FLAGS_COMPAT 0x10000  /* from Linux 3.8 on */
# endif
	if (tile_regs.flags & PT_FLAGS_COMPAT)
		currpers = 1;
	else
		currpers = 0;
#endif
	update_personality(tcp, currpers);
	tcp->scno = tile_regs.regs[10];

	return 1;
}