summaryrefslogtreecommitdiff
path: root/test/misc/tst-syscall0.c
blob: 890eeb40cc799946e6064f22c4ec6845050bb508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>

#ifndef SYS_getpid
#define _SYS_call0 SYS_getxpid
#else
#define _SYS_call0 SYS_getpid
#endif

int main() {
	int pid;

	pid = syscall(_SYS_call0);
   	if (pid > 0) {
		printf("syscall(SYS_getpid) says %d\n", pid);
     		return 0;
	}

	return 1;
}