diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-09 20:09:17 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-09 20:09:17 +0200 |
| commit | 87a6be8bc3404abea2af788c46cf450dc8bb6204 (patch) | |
| tree | 516422059a759c4a4b251f609996f0fee00f3ae0 /common/dispatch.c | |
| parent | 11f41d3dea0b959aea747546dc7b6beb655bec2a (diff) | |
| download | kmi-87a6be8bc3404abea2af788c46cf450dc8bb6204.tar.gz kmi-87a6be8bc3404abea2af788c46cf450dc8bb6204.zip | |
silence ubsan and docs warnings
Diffstat (limited to 'common/dispatch.c')
| -rw-r--r-- | common/dispatch.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/common/dispatch.c b/common/dispatch.c index 1325d62..7fc13cf 100644 --- a/common/dispatch.c +++ b/common/dispatch.c @@ -1,6 +1,29 @@ #include <apos/uapi.h> #include <apos/ipi.h> +/** + * @file dispatch.c + * + * Interface between assembly and C for dispatching syscalls/IPIs. + * In apos, IPIs are a higher level concept and is not expected to be handled by + * the underlying architecture. Instead, we only require that there is some way + * to trigger an interrupt in some other core, and check if the interrupt was an + * IPI or syscall in C. + */ + +/** + * Syscall/IPI handler. + * If a syscall was triggered, parameters have the meaning they are given. + * Otherwise, they are meaningless and unused. + * + * @param a Syscall number. + * @param b Argument 0. + * @param c Argument 1. + * @param d Argument 2. + * @param e Argument 3. + * @param f Argument 4. + * @return Return value of taken action. + */ struct sys_ret dispatch(sys_arg_t a, sys_arg_t b, sys_arg_t c, sys_arg_t d, sys_arg_t e, sys_arg_t f) { |
