diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-09-14 23:34:58 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-09-14 23:34:58 +0300 |
| commit | 30055ec1753b5f8cfc2940dba5d4188475fdbf7f (patch) | |
| tree | 5497eb92f0f7083755589ca5a31755166a739522 /include/apos | |
| parent | cabbf335824db0df835e4c541c19d3803ce38454 (diff) | |
| download | kmi-30055ec1753b5f8cfc2940dba5d4188475fdbf7f.tar.gz kmi-30055ec1753b5f8cfc2940dba5d4188475fdbf7f.zip | |
add putch syscall for easier userspace debugging
+ Note that it is NOT intended for end user usage, just for debugging.
Diffstat (limited to 'include/apos')
| -rw-r--r-- | include/apos/syscalls.h | 17 | ||||
| -rw-r--r-- | include/apos/uapi.h | 16 |
2 files changed, 32 insertions, 1 deletions
diff --git a/include/apos/syscalls.h b/include/apos/syscalls.h index baa1139..84d9e07 100644 --- a/include/apos/syscalls.h +++ b/include/apos/syscalls.h @@ -12,10 +12,25 @@ /** enum for now, possibly macros in the future once I get an approximate idea of * which syscalls are necessary etc. */ enum { - /** @name Misc. */ + /** + * @name Misc. + * Implementation in \ref dispatch.c instead of a separate file, as I + * consider them 'internal' and not intended for users. + */ /** @{ */ /** Noop, mainly for testing syscall subsystem and sanity checking. */ SYS_NOOP, + + /** + * Put a single character to the serial lines. + * Do not rely on this actually working, as the serial drivers are only + * included on debugging kernels. + * + * \todo Should serial drivers be always included and debugging mode + * turned into whether \ref info is turned on or off or something? + */ + SYS_PUTCH, + /** @} */ /* @name Memory management. */ diff --git a/include/apos/uapi.h b/include/apos/uapi.h index 6832f79..1ebdc21 100644 --- a/include/apos/uapi.h +++ b/include/apos/uapi.h @@ -181,6 +181,9 @@ struct sys_ret { } \ static inline struct sys_ret __##name +/** @name Misc syscalls. */ +/** @{ */ + /** * Noop syscall. * @@ -192,6 +195,19 @@ struct sys_ret { */ SYSCALL_DECLARE0(noop); +/** + * Putch syscall. + * + * @param ch Character to put. + * @param b Unused. + * @param c Unused. + * @param d Unused. + * @return \ref OK and 0. + */ +SYSCALL_DECLARE1(putch, ch); + +/** @} */ + /* @name Memory handling syscalls. */ /** @{ */ /** |
