diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-10-21 21:34:18 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-10-21 21:34:18 +0300 |
| commit | dd7c04a39bd88da8e381bb88078c41b049a6665c (patch) | |
| tree | f5210700cc1789547ae55926c7f9aaa753fbb791 /include | |
| parent | ec989bbe7d9bb7a844eeddeceaeb7bb7e4d5dab6 (diff) | |
| download | kmi-dd7c04a39bd88da8e381bb88078c41b049a6665c.tar.gz kmi-dd7c04a39bd88da8e381bb88078c41b049a6665c.zip | |
beautification
Diffstat (limited to 'include')
| -rw-r--r-- | include/apos/uapi.h | 8 | ||||
| -rw-r--r-- | include/apos/utils.h | 2 | ||||
| -rw-r--r-- | include/arch/cpu.h | 1 | ||||
| -rw-r--r-- | include/arch/proc.h | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/include/apos/uapi.h b/include/apos/uapi.h index 02e8816..7da24c6 100644 --- a/include/apos/uapi.h +++ b/include/apos/uapi.h @@ -51,6 +51,14 @@ struct sys_ret { sys_arg_t ar4; }; +#define SYS_RET0() (struct sys_ret){0, 0, 0, 0, 0, 0} +#define SYS_RET1(a) (struct sys_ret){a, 0, 0, 0, 0, 0} +#define SYS_RET2(a, b) (struct sys_ret){a, b, 0, 0, 0, 0} +#define SYS_RET3(a, b, c) (struct sys_ret){a, b, c, 0, 0, 0} +#define SYS_RET4(a, b, c, d) (struct sys_ret){a, b, c, d, 0, 0} +#define SYS_RET5(a, b, c, d, e) (struct sys_ret){a, b, c, d, e, 0} +#define SYS_RET6(a, b, c, d, e, f) (struct sys_ret){a, b, c, d, e, f} + /** * Helper macro for declaring syscalls with zero arguments. * diff --git a/include/apos/utils.h b/include/apos/utils.h index 6eeb54f..378f3a0 100644 --- a/include/apos/utils.h +++ b/include/apos/utils.h @@ -190,7 +190,7 @@ * Signal to the compiler that some region is unreachable. * Mainly used for debugging with instrumentation, though it could provide some * micro-optimisations. -*/ + */ #if __has_builtin(__builtin_unreachable) #define unreachable() __builtin_unreachable() #else diff --git a/include/arch/cpu.h b/include/arch/cpu.h index 3156076..ddea2ac 100644 --- a/include/arch/cpu.h +++ b/include/arch/cpu.h @@ -30,6 +30,7 @@ id_t cpu_id(); /** * Assign tcb to current cpu. + * Essentially sets t->cpu_id to the cpu id, plus whatever the arch needs. * * @param t \ref tcb to assign to current cpu. */ diff --git a/include/arch/proc.h b/include/arch/proc.h index 5ea0f0f..5047eab 100644 --- a/include/arch/proc.h +++ b/include/arch/proc.h @@ -25,7 +25,7 @@ */ void set_args(struct tcb *t, struct sys_ret a); -/** +/** * Get argument data attached to thread. * To some extent a hack, used by swap. * |
