Overview
Comment: | add volatile qualifiers, add helper functions for error mechanism |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6bc8ca3cac15ce250bf87fce66a5c909 |
User & Date: | lexi on 2019-10-21 01:40:38 |
Other Links: | manifest | tags |
Context
2019-10-21
| ||
01:46 | fix broken commit check-in: bdb84af41a user: lexi tags: trunk | |
01:40 | add volatile qualifiers, add helper functions for error mechanism check-in: 6bc8ca3cac user: lexi tags: trunk | |
01:03 | change testbin to pass appropriate string lengths to kiosend check-in: 3626b335f2 user: lexi tags: trunk | |
Changes
Modified arch/posix.h from [bc192b16ff] to [4c89ca109f].
77 77 * selected by the build script; /arch/$target 78 78 * is set as an include directory */ 79 79 # include <system_calls.h> 80 80 #endif 81 81 82 82 #ifdef KFplatform_define_funcs 83 83 84 -extern struct k_platform_syscall_answer 85 -k_platform_syscall(enum k_platform_syscall call, u8 valency, 86 - k_platform_syscall_arg args[]); 84 +volatile extern struct k_platform_syscall_answer 85 +k_platform_syscall(volatile enum k_platform_syscall call, 86 + volatile u8 valency, volatile k_platform_syscall_arg args[]); 87 87 88 88 #endif 89 89 90 90 #endif
Modified mod/kcore/core.h from [4bc4090351] to [58676980aa].
1 1 #ifndef KIcore 2 2 #define KIcore 3 3 #include <k/type.h> 4 4 #include <k/io.h> 5 5 #include <k/str.h> 6 +#include <k/internal.egroup.h> 6 7 7 8 #ifdef __cplusplus 8 9 extern "C" { 9 10 #endif 10 11 11 12 typedef struct kvar { 12 13 ksraw name; ................................................................................ 24 25 /* i'm really sorry okay */ 25 26 typedef 26 27 #if (__STDC_VERSION__ >= 199901L) 27 28 _Bool bool; 28 29 #endif 29 30 enum 30 31 #if !(__STDC_VERSION__ >= 199901L) 32 + 31 33 bool /* enum bool { */ 32 34 #endif 33 35 { 34 36 false = 0, no = 0, 35 37 true = 1, yes = 1 36 38 } 37 39 #if !(__STDC_VERSION__ >= 199901L) ................................................................................ 154 156 * and there are few enough error conditions 155 157 * in each that 16-bit address space should 156 158 * be more than enough for the foreseeable 157 159 * future. however if that changes, altering 158 160 * the definition here will effect all the 159 161 * necessary changes throughout the library */ 160 162 bool kokay(kcond); 163 + 164 +typedef struct kerror { 165 + const char* module_name, 166 + * module_desc, 167 + * error_string; 168 + kcond error; 169 +} kerror; 170 + 171 +kerror kexplain(kcond); 161 172 162 173 #ifdef __cplusplus 163 174 } 164 175 #endif 165 176 166 177 #endif
Modified mod/kcore/platform.syscall.fn.c from [4315e80d93] to [f22252d79e].
12 12 13 13 #ifdef KFenv_posix 14 14 # include <posix.h> 15 15 #else 16 16 Knoimpl(k_platform_syscall) 17 17 #endif 18 18 19 -extern void k_platform_syscall_raw ( 20 - k_platform_syscall_return* return_slot, 21 - k_platform_syscall_error* error_no_slot, 22 - enum k_platform_syscall syscall_no, 23 - u8 valency, 24 - s64* args); 19 +volatile extern void k_platform_syscall_raw ( 20 + volatile k_platform_syscall_return* return_slot, 21 + volatile k_platform_syscall_error* error_no_slot, 22 + volatile enum k_platform_syscall syscall_no, 23 + volatile u8 valency, 24 + volatile s64* args); 25 25 26 -struct k_platform_syscall_answer 27 -k_platform_syscall(enum k_platform_syscall call, u8 valency, s64 args[]) { 26 +volatile struct k_platform_syscall_answer 27 +k_platform_syscall(volatile enum k_platform_syscall call, volatile u8 valency, volatile s64 args[]) { 28 28 struct k_platform_syscall_answer answer; 29 29 30 30 k_platform_syscall_raw 31 31 (&answer.ret, 32 32 &answer.error, 33 33 call, valency, args); 34 34 35 35 return answer; 36 36 }