blob: ae46b1639ebed3d7ce6cc7d6563aa44790001af4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef _UNISTD_H
#define _UNISTD_H
#define __SYS_puts 0
#define __SYS_time 1
#define _syscall0(type, name) \
type name(void) { \
type __res; \
__asm__ volatile ( \
"int $0x80" \
: "=a" (__res) \
: "a" (__SYS_##name) \
:); \
return __res; \
}
#define _syscall1(type, name, atype, a) \
type name(atype a) { \
type __res; \
__asm__ volatile ( \
"int $0x80" \
: "=a" (__res) \
: "a" (__SYS_##name), "b" (a) \
:); \
return __res; \
}
#endif
|