diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2022-05-02 11:15:40 -0700 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2022-06-28 04:41:37 +0530 |
| commit | 1b9177f7495086f1595d7c989c810013f1c9eb5a (patch) | |
| tree | 41469c64b92e70a3b352c170d28cedc590e09dcc /include/semihosting/console.h | |
| parent | 2d010c2719da360d44a5c44d279d49eca21c5de8 (diff) | |
| download | focaccia-qemu-1b9177f7495086f1595d7c989c810013f1c9eb5a.tar.gz focaccia-qemu-1b9177f7495086f1595d7c989c810013f1c9eb5a.zip | |
semihosting: Create semihost_sys_poll_one
This will be used for implementing the xtensa select_one system call. Choose "poll" over "select" so that we can reuse Glib's g_poll constants and to avoid struct timeval. Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/semihosting/console.h')
| -rw-r--r-- | include/semihosting/console.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/semihosting/console.h b/include/semihosting/console.h index 20c31d89d4..61b0cb3a94 100644 --- a/include/semihosting/console.h +++ b/include/semihosting/console.h @@ -53,4 +53,20 @@ int qemu_semihosting_console_write(void *buf, int len); */ int qemu_semihosting_log_out(const char *s, int len); +/* + * qemu_semihosting_console_block_until_ready: + * @cs: CPUState + * + * If no data is available we suspend the CPU and will re-execute the + * instruction when data is available. + */ +void qemu_semihosting_console_block_until_ready(CPUState *cs); + +/** + * qemu_semihosting_console_ready: + * + * Return true if characters are available for read; does not block. + */ +bool qemu_semihosting_console_ready(void); + #endif /* SEMIHOST_CONSOLE_H */ |