I'm currently trying to get a syscall on my Linux X64 done via inline assembler in C. As none of my approaches worked, I wanted to figure out, how this is done in glibc. What I found was the following in /misc/syscall.c
long int
syscall (callno)
long int callno;
{
__set_errno (ENOSYS);
return -1;
}
I have to say I'm new to C (I'm a Java developer) so I don't understand the syntax here.
My questions are the following:
Is it correct that I can write the declaration of function parameters after the list of parameters in the brackets like this:
void foo(bar) long int bar; { //function code }
How can I find the actual implementation in assembler of syscalls in glibc? (Doesn't need to be the correct position, any hint is appreciated)