blob: f80d550ee8dee2687151d68d7225149474cb3042 [file] [log] [blame]
wdenkaffae2b2002-08-17 09:36:01 +00001#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 */
9int mon_getc(void);
10int mon_tstc(void);
11void mon_putc(const char);
12void mon_puts(const char*);
13void mon_printf(const char* fmt, ...);
14void mon_install_hdlr(int, interrupt_handler_t*, void*);
15void mon_free_hdlr(int);
16void *mon_malloc(size_t);
17void mon_free(void*);
18
19#endif /* ifndef __ASSEMBLY__ */
20
21#define NR_SYSCALLS 9 /* number of syscalls */
22
23/*
24 * Make sure these functions are in the same order as they
25 * appear in the "examples/syscall.S" file !!!
26 */
27#define SYSCALL_GETC 0
28#define SYSCALL_TSTC 1
29#define SYSCALL_PUTC 2
30#define SYSCALL_PUTS 3
31#define SYSCALL_PRINTF 4
32#define SYSCALL_INSTALL_HDLR 5
33#define SYSCALL_FREE_HDLR 6
34#define SYSCALL_MALLOC 7
35#define SYSCALL_FREE 8
36
37#endif