21 lines
876 B
Plaintext
21 lines
876 B
Plaintext
__syscall2
|
|
==========
|
|
:title: Shellcode Compiler Runtime
|
|
|
|
---------------------------------------------
|
|
long __syscall2(long& ret2, long num, ...);
|
|
---------------------------------------------
|
|
|
|
Issues system call number `num` on the target platform, expecting two return values instead of one.
|
|
Any additional arguments are passed directly to the system call. Returns the first half of the result
|
|
of the system call, with the second half of the result placed into the `ret2` variable.
|
|
|
|
IMPORTANT: On platforms that set a processor flag on error, such as FreeBSD, the `__syscall` function
|
|
will return the negation of the error code on error. This is to allow for unified behaviour across
|
|
different platforms. For example, checking the result of the `open` call for `-ENOENT` will work
|
|
across all supported UNIX-based platforms.
|
|
|
|
See also
|
|
--------
|
|
link:syscall.html[syscall]
|