Dmitry V. Levin
16510517f1
Make get_scno.c files more self-contained. While they are still being included by syscall.c, the latter no longer provides a function framework for them. * linux/aarch64/get_scno.c (arch_get_scno): Define. * linux/alpha/get_scno.c: Likewise. * linux/arc/get_scno.c: Likewise. * linux/arm/get_scno.c: Likewise. * linux/avr32/get_scno.c: Likewise. * linux/bfin/get_scno.c: Likewise. * linux/crisv10/get_scno.c: Likewise. * linux/hppa/get_scno.c: Likewise. * linux/i386/get_scno.c: Likewise. * linux/ia64/get_scno.c: Likewise. * linux/m68k/get_scno.c: Likewise. * linux/metag/get_scno.c: Likewise. * linux/microblaze/get_scno.c: Likewise. * linux/mips/get_scno.c: Likewise. * linux/nios2/get_scno.c: Likewise. * linux/or1k/get_scno.c: Likewise. * linux/powerpc/get_scno.c: Likewise. * linux/powerpc64/get_scno.c: Likewise. * linux/s390/get_scno.c: Likewise. * linux/sh/get_scno.c: Likewise. * linux/sh64/get_scno.c: Likewise. * linux/sparc/get_scno.c: Likewise. * linux/sparc64/get_scno.c: Likewise. * linux/tile/get_scno.c: Likewise. * linux/x86_64/get_scno.c: Likewise. * linux/xtensa/get_scno.c: Likewise. * syscall.c (arch_get_scno): New declaration. Include "get_scno.c" in file scope. (get_scno): Use arch_get_scno. Requested-by: Denys Vlasenko <dvlasenk@redhat.com>
23 lines
424 B
C
23 lines
424 B
C
/* 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;
|
|
}
|