summaryrefslogtreecommitdiff
path: root/src/nonstd/SYSCALL0.c
blob: c52a944d33a3688324420f874ac2e4035ac5c40d (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <nonstd/syscall.h>

#define SYSCALL0(_name, _type)
	static int _scno = -2; \
	if (_scno == -2) { _scno = ((sycall_lookup_t)__libc(LOOKUP))(_name); } \
	_type _ret = __syscall(_scno); \
	if (_ret < 0) { \
		errno = -_ret; \
		return -1; \
	} \
	return _ret