#ifndef _SYSCALL_H_
#define _SYSCALL_H_

typedef int (*syscallfunc_t)();

typedef struct syscall {
    char *sym;
    syscallfunc_t addr;
} syscall_t;

extern syscall_t systable[];

#define SYS_WRITE   0
#define SYS_WRITEV  1
#define SYS_READ    2
#define SYS_READV   3
#define SYS_GETMSG  4
#define SYS_PUTMSG  5
#define SYS_POLL    6
#define SYS_OPEN    7
#define SYS_CLOSE   8
#define SYS_PIPE    9
#define SYS_FCNTL   10
#define SYS_DUP     11
#define SYS_CREAT   12
#define SYS_SOCKET  13
#define SYS_LISTEN  14
#define SYS_ACCEPT  15
#define SYS_CONNECT 16
#define SYS_RECV    17
#define SYS_SEND    18
#define SYS_RECVFROM    19
#define SYS_SELECT  20
#define SYS_STAT    21
#define SYS_ACCESS  22
#define SYS_MKDIR   23
#define SYS_RMDIR   24
#define SYS_UNLINK  25
#define SYS_RENAME  26
#define SYS_OPENDIR 27
#define SYS_CLOSEDIR    28
#define SYS_READDIR 29
#define SYS_LSEEK   30
#define SYS_IOCTL   31
#define SYS_SOPEN   32

#endif 
