diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-11 23:35:33 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-11 23:35:33 +0300 |
| commit | 62ee0f7e1936a9eccb55fa360a1dce223819e0b8 (patch) | |
| tree | 2c67698cac4e94cd7643f7acf19f1ada12f37472 /include | |
| parent | 56fb0b774a8e89be1cb7ab1e5f464bbedd19fb22 (diff) | |
| download | kmi-62ee0f7e1936a9eccb55fa360a1dce223819e0b8.tar.gz kmi-62ee0f7e1936a9eccb55fa360a1dce223819e0b8.zip | |
continue documentation
Diffstat (limited to 'include')
| -rw-r--r-- | include/apos/attrs.h | 4 | ||||
| -rw-r--r-- | include/apos/debug.h | 2 | ||||
| -rw-r--r-- | include/arch/cpu.h | 11 | ||||
| -rw-r--r-- | include/arch/timer.h | 3 |
4 files changed, 17 insertions, 3 deletions
diff --git a/include/apos/attrs.h b/include/apos/attrs.h index 76ef39f..0cb167c 100644 --- a/include/apos/attrs.h +++ b/include/apos/attrs.h @@ -33,6 +33,10 @@ */ #define __fmt(x, y) __attribute__((format(__printf__, x, y))) + +/** Printf formatting attribute to not confuse doxygen. */ +#define __printf __fmt(1, 2) + /** * Align object. * diff --git a/include/apos/debug.h b/include/apos/debug.h index 6263ea2..f703974 100644 --- a/include/apos/debug.h +++ b/include/apos/debug.h @@ -326,7 +326,7 @@ enum serial_dev { * * @param fmt Format string. Integer subset of normal printf formatting. */ -void dbg(const char *fmt, ...) __fmt(1, 2); +void __printf dbg(const char *fmt, ...); /** * Initialize debugging, set up serial driver etc. diff --git a/include/arch/cpu.h b/include/arch/cpu.h index 8913b85..4fe0c99 100644 --- a/include/arch/cpu.h +++ b/include/arch/cpu.h @@ -8,6 +8,7 @@ */ #include <apos/types.h> +#include <apos/tcb.h> #if defined(riscv64) #include "../../arch/riscv64/include/cpu.h" @@ -24,6 +25,14 @@ */ id_t cpu_id(); -/** \todo add more cpu handling functions */ +/** + * Assign tcb to current cpu. + * + * @param t \ref tcb to assign to current cpu. + */ +void cpu_assign(struct tcb *t); + +/** \todo Should init be assigned one thread per core, or how should I handle + * giving out CPU IDs? */ #endif /* APOS_CPU_H */ diff --git a/include/arch/timer.h b/include/arch/timer.h index 71f878a..7f12100 100644 --- a/include/arch/timer.h +++ b/include/arch/timer.h @@ -18,9 +18,10 @@ /** * Get hardware timer frequency. * + * @param fdt Global FDT pointer. * @return Hardware timer frequency, ticks/sec. */ -ticks_t stat_timer(); +ticks_t stat_timer(const void *fdt); /** * Set up timer interrupt for absolute ticks. |
