Index: arch/posix.h ================================================================== --- arch/posix.h +++ arch/posix.h @@ -79,12 +79,12 @@ # include #endif #ifdef KFplatform_define_funcs -extern struct k_platform_syscall_answer -k_platform_syscall(enum k_platform_syscall call, u8 valency, - k_platform_syscall_arg args[]); +volatile extern struct k_platform_syscall_answer +k_platform_syscall(volatile enum k_platform_syscall call, + volatile u8 valency, volatile k_platform_syscall_arg args[]); #endif #endif Index: mod/kcore/core.h ================================================================== --- mod/kcore/core.h +++ mod/kcore/core.h @@ -1,10 +1,11 @@ #ifndef KIcore #define KIcore #include #include #include +#include #ifdef __cplusplus extern "C" { #endif @@ -26,10 +27,11 @@ #if (__STDC_VERSION__ >= 199901L) _Bool bool; #endif enum #if !(__STDC_VERSION__ >= 199901L) + bool /* enum bool { */ #endif { false = 0, no = 0, true = 1, yes = 1 @@ -156,11 +158,20 @@ * be more than enough for the foreseeable * future. however if that changes, altering * the definition here will effect all the * necessary changes throughout the library */ bool kokay(kcond); + +typedef struct kerror { + const char* module_name, + * module_desc, + * error_string; + kcond error; +} kerror; + +kerror kexplain(kcond); #ifdef __cplusplus } #endif #endif Index: mod/kcore/platform.syscall.fn.c ================================================================== --- mod/kcore/platform.syscall.fn.c +++ mod/kcore/platform.syscall.fn.c @@ -14,23 +14,23 @@ # include #else Knoimpl(k_platform_syscall) #endif -extern void k_platform_syscall_raw ( - k_platform_syscall_return* return_slot, - k_platform_syscall_error* error_no_slot, - enum k_platform_syscall syscall_no, - u8 valency, - s64* args); +volatile extern void k_platform_syscall_raw ( + volatile k_platform_syscall_return* return_slot, + volatile k_platform_syscall_error* error_no_slot, + volatile enum k_platform_syscall syscall_no, + volatile u8 valency, + volatile s64* args); -struct k_platform_syscall_answer -k_platform_syscall(enum k_platform_syscall call, u8 valency, s64 args[]) { +volatile struct k_platform_syscall_answer +k_platform_syscall(volatile enum k_platform_syscall call, volatile u8 valency, volatile s64 args[]) { struct k_platform_syscall_answer answer; k_platform_syscall_raw (&answer.ret, &answer.error, call, valency, args); return answer; }