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>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user