diff options
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/balloon.h | 2 | ||||
-rw-r--r-- | include/sysemu/char.h | 20 | ||||
-rw-r--r-- | include/sysemu/os-posix.h | 2 | ||||
-rw-r--r-- | include/sysemu/sysemu.h | 2 |
4 files changed, 18 insertions, 8 deletions
diff --git a/include/sysemu/balloon.h b/include/sysemu/balloon.h index bd9d39505d..0345e01efb 100644 --- a/include/sysemu/balloon.h +++ b/include/sysemu/balloon.h @@ -24,6 +24,4 @@ int qemu_add_balloon_handler(QEMUBalloonEvent *event_func, QEMUBalloonStatus *stat_func, void *opaque); void qemu_remove_balloon_handler(void *opaque); -void qemu_balloon_changed(int64_t actual); - #endif diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 672ed39a31..c8b15f9729 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -54,6 +54,7 @@ typedef struct { typedef void IOEventHandler(void *opaque, int event); struct CharDriverState { + QemuMutex chr_write_lock; void (*init)(struct CharDriverState *s); int (*chr_write)(struct CharDriverState *s, const uint8_t *buf, int len); int (*chr_sync_read)(struct CharDriverState *s, @@ -89,6 +90,15 @@ struct CharDriverState { }; /** + * @qemu_chr_alloc: + * + * Allocate and initialize a new CharDriverState. + * + * Returns: a newly allocated CharDriverState. + */ +CharDriverState *qemu_chr_alloc(void); + +/** * @qemu_chr_new_from_opts: * * Create a new character backend from a QemuOpts list. @@ -155,6 +165,7 @@ void qemu_chr_fe_event(CharDriverState *s, int event); * @qemu_chr_fe_printf: * * Write to a character backend using a printf style interface. + * This function is thread-safe. * * @fmt see #printf */ @@ -167,8 +178,9 @@ int qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond, /** * @qemu_chr_fe_write: * - * Write data to a character backend from the front end. This function will - * send data from the front end to the back end. + * Write data to a character backend from the front end. This function + * will send data from the front end to the back end. This function + * is thread-safe. * * @buf the data * @len the number of bytes to send @@ -183,7 +195,7 @@ int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len); * Write data to a character backend from the front end. This function will * send data from the front end to the back end. Unlike @qemu_chr_fe_write, * this function will block if the back end cannot consume all of the data - * attempted to be written. + * attempted to be written. This function is thread-safe. * * @buf the data * @len the number of bytes to send @@ -207,7 +219,7 @@ int qemu_chr_fe_read_all(CharDriverState *s, uint8_t *buf, int len); /** * @qemu_chr_fe_ioctl: * - * Issue a device specific ioctl to a backend. + * Issue a device specific ioctl to a backend. This function is thread-safe. * * @cmd see CHR_IOCTL_* * @arg the data associated with @cmd diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index 25d0b2a73f..f1315213f1 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -26,6 +26,8 @@ #ifndef QEMU_OS_POSIX_H #define QEMU_OS_POSIX_H +#include <sys/time.h> + void os_set_line_buffering(void); void os_set_proc_name(const char *s); void os_setup_signal_handling(void); diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 6b4cc133c5..285c45baf2 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -202,8 +202,6 @@ void do_usb_add(Monitor *mon, const QDict *qdict); void do_usb_del(Monitor *mon, const QDict *qdict); void usb_info(Monitor *mon, const QDict *qdict); -void rtc_change_mon_event(struct tm *tm); - void add_boot_device_path(int32_t bootindex, DeviceState *dev, const char *suffix); char *get_boot_devices_list(size_t *size, bool ignore_suffixes); |