#ifndef _SYS_SYSCALL_H #define _SYS_SYSCALL_H #include <_PDCLIB/cdefs.h> #include /* argument types for dios syscalls */ #include #include #include #include #include #include #include #include typedef enum { SYS_NONE = 0, #define SYSCALL(n,...) SYS_ ## n, #include #undef SYSCALL SYS_MAXSYSCALL } _DiOS_SC; typedef struct { _DiOS_SC _syscode; int *_err; void *_ret; va_list _args; } _DiOS_Syscall; #ifdef __cplusplus #include namespace __dios { struct SysProxy { #define SYSCALL( name, schedule, ret, arg ) static ret name arg noexcept; #include #include #include #undef SYSCALL }; } #endif #ifndef __dios_kernel__ _PDCLIB_EXTERN_C long syscall( int number, ... ) __nothrow; #define SYSCALL(...) #define SYSCALL_DIOS( name, sched, ret, args ) ret __dios_ ## name args __nothrow; #include #include #include #undef SYSCALL #undef SYSCALL_DIOS _PDCLIB_EXTERN_END #endif #endif