#include <types.h>
Go to the source code of this file.
Defines | |
#define | SYS_exit 0 |
Go back to the system. | |
#define | SYS_getchar 1 |
Get a char from stdin. | |
#define | SYS_putchar 2 |
Put a character on stdout. | |
#define | SYS_malloc 3 |
Allocate a memory area. | |
#define | SYS_free 4 |
Free a memory area. | |
#define | _syscall0(type, name) |
The core of a system call with no argument. | |
#define | _syscall1(type, name, type1, arg1) |
The core of a system call with 1 argument. | |
#define | _syscall2(type, name, type1, arg1, type2, arg2) |
The core of a system call with 2 argument. | |
#define | _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) |
The core of a system call with 3 argument. | |
#define | _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) |
The core of a system call with 4 argument. | |
Functions | |
__inline__ | _syscall1 (int, exit, int, exitcode) |
__inline__ | _syscall0 (int, getchar) |
__inline__ | _syscall1 (void, putchar, int, c) |
__inline__ | _syscall1 (void *, malloc, size_t, size) |
__inline__ | _syscall1 (void, free, void *, ptr) |
Definition in file sys.h.
|
Value: type name(void) \ { \ register long __ret; \ __asm__ __volatile__ ( \ "pushl %%ebp\n" \ "movl %%esp, %%ebp\n" \ "int $0x80\n" \ "popl %%ebp" \ : "=a"(__ret) : "0"(SYS_##name)); \ return((type)__ret); \ }
|
|
Value: type name(type1 arg1) \ { \ register long __ret; \ __asm__ __volatile__ ( \ "pushl %%ebp\n" \ "pushl %2\n" \ "movl %%esp, %%ebp\n" \ "int $0x80\n" \ "add $4, %%esp\n" \ "popl %%ebp" \ : "=a"(__ret) : "0"(SYS_##name), \ "r"((long)(arg1))); \ return((type)__ret); \ }
|
|
Value: type name(type1 arg1, type2 arg2) \ { \ register long __ret; \ __asm__ __volatile__ ( \ "pushl %%ebp\n" \ "pushl %2\n" \ "pushl %3\n" \ "movl %%esp, %%ebp\n" \ "int $0x80\n" \ "add $8, %%esp\n" \ "popl %%ebp" \ : "=a"(__ret) : "0"(SYS_##name), \ "r"((long)(arg1)), "r"((long)(arg2))); \ return((type)__ret); \ }
|
|
Value: type name(type1 arg1, type2 arg2, type3 arg3) \ { \ register long __ret; \ __asm__ __volatile__ ( \ "pushl %%ebp\n" \ "pushl %2\n" \ "pushl %3\n" \ "pushl %4\n" \ "movl %%esp, %%ebp\n" \ "int $0x80\n" \ "add $12, %%esp\n" \ "popl %%ebp" \ : "=a"(__ret) : "0"(SYS_##name), \ "r"((long)(arg1)), "r"((long)(arg2)), "r"((long)(arg3))); \ return((type)__ret); \ }
|
|
Value: type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ { \ register long __ret; \ __asm__ __volatile__ ( \ "pushl %%ebp\n" \ "pushl %2\n" \ "pushl %3\n" \ "pushl %4\n" \ "pushl %5\n" \ "movl %%esp, %%ebp\n" \ "int $0x80\n" \ "add $16, %%esp\n" \ "popl %%ebp" \ : "=a"(__ret) : "0"(SYS_##name), \ "r"((long)(arg1)), "r"((long)(arg2)), "r"((long)(arg3)), "r"((long)(arg4))); \ return((type)__ret); \ }
|
|
Go back to the system.
|
|
Free a memory area.
|
|
Get a char from stdin.
|
|
Allocate a memory area.
|
|
Put a character on stdout.
|
|
|
|
|
|
|
|
|
|
|