{"translation":"https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=json","source":["Syscalls in <trademark class=\"registered\">Linux</trademark> are performed (in userspace) using <literal>syscallX</literal> macros where X substitutes a number representing the number of parameters of the given syscall. This macro translates to a code that loads <varname>%eax</varname> register with a number of the syscall and executes interrupt <literal>0x80</literal>. After this syscall return is called, which translates negative return values to positive <literal>errno</literal> values and sets <literal>res</literal> to <literal>-1</literal> in case of an error. Whenever the interrupt <literal>0x80</literal> is called the process enters the kernel in system call trap handler. This routine saves all registers on the stack and calls the selected syscall entry. Note that the <trademark class=\"registered\">Linux</trademark> calling convention expects parameters to the syscall to be passed via registers as shown here:"],"previous_source":"","target":["Syscalls in <trademark class=\"registered\">Linux</trademark> are performed (in userspace) using <literal>syscallX</literal> macros where X substitutes a number representing the number of parameters of the given syscall. This macro translates to a code that loads <varname>%eax</varname> register with a number of the syscall and executes interrupt <literal>0x80</literal>. After this syscall return is called, which translates negative return values to positive <literal>errno</literal> values and sets <literal>res</literal> to <literal>-1</literal> in case of an error. Whenever the interrupt <literal>0x80</literal> is called the process enters the kernel in system call trap handler. This routine saves all registers on the stack and calls the selected syscall entry. Note that the <trademark class=\"registered\">Linux</trademark> calling convention expects parameters to the syscall to be passed via registers as shown here:"],"id_hash":8708711642775917643,"content_hash":8708711642775917643,"location":"article.translate.xml:504","context":"","note":"(itstool) path: sect4/para","flags":"","labels":[],"state":100,"fuzzy":false,"translated":true,"approved":false,"position":77,"has_suggestion":false,"has_comment":false,"has_failing_check":false,"num_words":120,"source_unit":"https://translate-dev.freebsd.org/api/units/99474/?format=json","priority":100,"id":99474,"web_url":"https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=f8db8f192ef7944b","url":"https://translate-dev.freebsd.org/api/units/99474/?format=json","explanation":"","extra_flags":"","pending":false,"timestamp":"2019-10-20T12:10:38.925972Z"}