| |||||
| |||||
![]() |
|||||
|
SYSCALL
2
2007-07-26
Linux
Linux Programmer's Manual
performs the system call whose assembly language interface has the specified number with the specified arguments. Symbolic constants for system calls can be found in the header file <sys/syscall.h> .
In general, a 0 return value indicates success. A -1 return value indicates an error, and an error code is stored in errno .
first appeared in 4BSD.
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/types.h>
int
main(int argc, char *argv[])
{
pid_t tid;
tid = syscall(SYS_gettid);
}
| |||||
|
| |||||