#ifdef SYSCALL

#define SYSCALLSEP SYSCALL
#define SYSCALL0 SYSCALL
#define SYSCALL1 SYSCALL
#define SYSCALL2 SYSCALL
#define SYSCALL3 SYSCALL
#define SYSCALL4 SYSCALL
#define SYSCALL5 SYSCALL

#define CONTINUE     SchedCommand::CONTINUE
#define RESCHEDULE   SchedCommand::RESCHEDULE

#endif // SYSCALL

SYSCALL1(close, CONTINUE, int, int, fd)
SYSCALL2(creat, CONTINUE, int, const char *, path, mode_t, mode)
SYSCALL3(read, CONTINUE, ssize_t, int, fd, void *, buf, size_t, count)
SYSCALL3(write, CONTINUE, ssize_t, int, fd, const void *, buf, size_t, count)
SYSCALL4(pread, CONTINUE, ssize_t, int, fd, void *, buf, size_t, count, off_t, offset)
SYSCALL4(pwrite, CONTINUE, ssize_t, int, fd, const void *, buf, size_t, count, off_t, offset)
SYSCALL3(lseek, CONTINUE, off_t, int, fildes, off_t, offset, int, whence)
SYSCALL1(dup, CONTINUE, int, int, oldfd)
SYSCALL2(dup2, CONTINUE, int, int, fildes, int, fildes2)
SYSCALL2(ftruncate, CONTINUE, int, int, fd, off_t, length)
SYSCALL2(truncate, CONTINUE, int, const char *, path, off_t, length)
SYSCALL1(rmdir, CONTINUE, int, const char *, pathname)
SYSCALL1(unlink, CONTINUE, int, const char *, path)
SYSCALL3(unlinkat, CONTINUE, int, int, dirfd, const char *, path, int, flags)
SYSCALL2(link, CONTINUE, int, const char *, target, const char *, linkpath)
SYSCALL5(linkat, CONTINUE, int, int, olddirfd, const char *, target, int, newdirfd, const char *, linkpath, int, flags)
SYSCALL2(symlink, CONTINUE, int, const char *, path1, const char *, path2)
SYSCALL3(symlinkat, CONTINUE, int, const char *, target, int, newdirfd, const char *, linkpath)
SYSCALL3(readlink, CONTINUE, ssize_t, const char *, pathname, char *, buf, size_t, bufsiz)
SYSCALL4(readlinkat, CONTINUE, ssize_t, int, dirfd, const char *,path, char *,buf, size_t, count)
SYSCALL2(access, CONTINUE, int, const char *, pathname, int, mode)
SYSCALL1(chdir, CONTINUE, int, const char *, path)
SYSCALL4(faccessat, CONTINUE, int, int, dirfd, const char *, path, int, mode, int, flags)
SYSCALL1(fsync, CONTINUE, int, int, fd)
SYSCALL1(fdatasync, CONTINUE, int, int, fd)
SYSCALL1(fchdir, CONTINUE, int, int, fd)
SYSCALL1(syncfs, CONTINUE, int, int, fd)
SYSCALL2(fstat, CONTINUE, int, int, fd, struct stat *, buf)
SYSCALL2(fstatfs, CONTINUE, int, int, fd, struct statfs *,buf)
SYSCALL2(lstat, CONTINUE, int, const char *, pathname, struct stat *, buf)
SYSCALL2(stat, CONTINUE, int, const char *, pathname, struct stat *, buf)
SYSCALL2(statfs, CONTINUE, int, const char *, path, struct statfs *, buf)
SYSCALL2(chmod, CONTINUE, int, const char *, path, mode_t, mode)
SYSCALL2(fchmod, CONTINUE, int, int, fd, mode_t, mode)
SYSCALL4(fchmodat, CONTINUE, int, int, dirfd, const char *, pathname, mode_t, mode, int, flags )
SYSCALL1(umask, CONTINUE, mode_t, mode_t, mask)
SYSCALL2(mkdir, CONTINUE, int, const char *, pathname, mode_t, mode)
SYSCALL3(mkdirat, CONTINUE,int, int, dirfd, const char *, pathname, mode_t, mode)
SYSCALL3(mknod, CONTINUE, int, const char *, path, mode_t, mode, dev_t, dev)
SYSCALL4(mknodat, CONTINUE,int, int, dirfd, const char *, pathname, mode_t, mode, dev_t, dev)
SYSCALL2(mkfifo, CONTINUE, int, const char *, path, mode_t, mode )
SYSCALL3(mkfifoat, CONTINUE, int, int, dirfd, const char *, path, mode_t, mode )
SYSCALLSEP(sync, CONTINUE)
SYSCALLSEP(open, CONTINUE)
SYSCALLSEP(openat, CONTINUE)
SYSCALLSEP(fcntl, CONTINUE)
SYSCALLSEP(pipe, CONTINUE)
SYSCALLSEP(start_thread, CONTINUE)
SYSCALLSEP(kill_thread, RESCHEDULE)
SYSCALLSEP(get_process_threads, CONTINUE)
SYSCALLSEP(hardware_concurrency, CONTINUE)
SYSCALLSEP(uname, CONTINUE)
SYSCALLSEP(fault_handler, CONTINUE)
SYSCALLSEP(kill_process, RESCHEDULE)
SYSCALLSEP(configure_fault, CONTINUE)
SYSCALLSEP(get_fault_config, CONTINUE)
SYSCALL1(closedir, CONTINUE, int, DIR *, dirp )
SYSCALL1(fdopendir, CONTINUE, DIR*, int, fd )
SYSCALL1(opendir, CONTINUE, DIR* , const char *, path )
SYSCALL1(dirfd, CONTINUE, int, DIR *, dirp)
SYSCALL1(readdir, CONTINUE, struct dirent *, DIR *, dirp)
SYSCALL3(readdir_r, CONTINUE, int, DIR *, dirp, struct dirent *, entry, struct dirent **, result)
SYSCALLSEP(seekdir, CONTINUE, void, DIR *, dirp, long, position)
SYSCALLSEP(rewinddir, CONTINUE, void, DIR *, dirp)
SYSCALL1(telldir, CONTINUE, long , DIR *, dirp)
SYSCALLSEP(scandir, CONTINUE)
SYSCALL3(socket, CONTINUE, int, int, domain, int, type, int, protocol )
SYSCALLSEP(socketpair, CONTINUE)
SYSCALL3(getsockname, CONTINUE, int, int, fd, struct sockaddr *, addr, socklen_t *, addrlen )
SYSCALL3(bind, CONTINUE, int, int, fd, const struct sockaddr *, addr, socklen_t, len )
SYSCALL3(connect, CONTINUE, int, int, fd, const struct sockaddr *, addr, socklen_t, len )
SYSCALL3(getpeername, CONTINUE, int, int, fd, struct sockaddr *, addr, socklen_t *, len )
SYSCALL4(send, CONTINUE, ssize_t, int, fd, const void *, buf, size_t, n, int, flags )
SYSCALLSEP(sendto, CONTINUE)
SYSCALL2(listen, CONTINUE, int, int, fd, int, n )
SYSCALL3(accept, CONTINUE, int, int, fd, struct sockaddr *, addr,  socklen_t *, addr_len )
SYSCALL4(accept4, CONTINUE, int, int, fd, struct sockaddr *, addr, socklen_t *, addr_len, int, flags )
SYSCALL4(recv, CONTINUE, ssize_t, int, fd, void *,buf, size_t, n, int, flags )
SYSCALLSEP(recvfrom, CONTINUE)
SYSCALL1(isatty, CONTINUE, int, int, fd )
SYSCALL1(ttyname, CONTINUE, char *, int, fd )
SYSCALL3(ttyname_r, CONTINUE, int, int, fd, char *, buf, size_t, count )
SYSCALL4(_FS_renameitemat, CONTINUE, int, int, olddirfd, const char *, oldpath, int, newdirfd, const char *, newpath )
SYSCALL2(_FS_renameitem, CONTINUE, int, const char *, oldpath, const char *, newpath )


#undef SYSCALL
#undef SYSCALLSEP
#undef SYSCALL0
#undef SYSCALL1
#undef SYSCALL2
#undef SYSCALL3
#undef SYSCALL4
#undef SYSCALL5

#undef CONTINUE
#undef RESCHEDULE
