wdenk | affae2b | 2002-08-17 09:36:01 +0000 | [diff] [blame] | 1 | #ifndef __MON_SYS_CALL_H__ |
| 2 | #define __MON_SYS_CALL_H__ |
| 3 | |
| 4 | #ifndef __ASSEMBLY__ |
| 5 | |
| 6 | #include <common.h> |
| 7 | |
| 8 | /* These are declarations of system calls available in C code */ |
| 9 | int mon_getc(void); |
| 10 | int mon_tstc(void); |
| 11 | void mon_putc(const char); |
| 12 | void mon_puts(const char*); |
| 13 | void mon_printf(const char* fmt, ...); |
| 14 | void mon_install_hdlr(int, interrupt_handler_t*, void*); |
| 15 | void mon_free_hdlr(int); |
| 16 | void *mon_malloc(size_t); |
| 17 | void mon_free(void*); |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 18 | void mon_udelay(unsigned long); |
| 19 | unsigned long mon_get_timer(unsigned long); |
wdenk | affae2b | 2002-08-17 09:36:01 +0000 | [diff] [blame] | 20 | |
| 21 | #endif /* ifndef __ASSEMBLY__ */ |
| 22 | |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 23 | #define NR_SYSCALLS 11 /* number of syscalls */ |
| 24 | |
wdenk | affae2b | 2002-08-17 09:36:01 +0000 | [diff] [blame] | 25 | |
| 26 | /* |
| 27 | * Make sure these functions are in the same order as they |
| 28 | * appear in the "examples/syscall.S" file !!! |
| 29 | */ |
| 30 | #define SYSCALL_GETC 0 |
| 31 | #define SYSCALL_TSTC 1 |
| 32 | #define SYSCALL_PUTC 2 |
| 33 | #define SYSCALL_PUTS 3 |
| 34 | #define SYSCALL_PRINTF 4 |
| 35 | #define SYSCALL_INSTALL_HDLR 5 |
| 36 | #define SYSCALL_FREE_HDLR 6 |
| 37 | #define SYSCALL_MALLOC 7 |
| 38 | #define SYSCALL_FREE 8 |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 39 | #define SYSCALL_UDELAY 9 |
| 40 | #define SYSCALL_GET_TIMER 10 |
wdenk | affae2b | 2002-08-17 09:36:01 +0000 | [diff] [blame] | 41 | |
| 42 | #endif |