syscall function
Invoke `system call' number SYSNO, passing it the remaining arguments. This is completely system-dependent, and not often useful.
In Unix, syscall' sets
errno' for all errors and most calls return -1
for errors; in many systems you cannot pass arguments or get return
values for all system calls (pipe',
fork', and `getppid' typically
among them).
In Mach, all system calls take normal arguments and always return an error code (zero for success).
Implementation
int syscall(
int __sysno,
) {
_syscall ??= Libc()
.dylib
.lookupFunction<ffi.Int64 Function(ffi.Int64), _dart_syscall>('syscall');
return _syscall!(
__sysno,
);
}