Optimize known_scno()

* syscall.c (known_scno): Do not check for native_scno field on
platforms that support only one personality.
This commit is contained in:
Дмитрий Левин 2011-02-18 23:19:47 +00:00
parent fde119c792
commit bd13645efb

View File

@ -1326,13 +1326,14 @@ get_scno(struct tcb *tcp)
long
known_scno(tcp)
struct tcb *tcp;
known_scno(struct tcb *tcp)
{
long scno = tcp->scno;
#if SUPPORTED_PERSONALITIES > 1
if (scno >= 0 && scno < nsyscalls && sysent[scno].native_scno != 0)
scno = sysent[scno].native_scno;
else
#endif
scno += NR_SYSCALL_BASE;
return scno;
}