monitor: Spell "I/O thread" consistently in comments
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180703085358.13941-3-armbru@redhat.com>
···243243/* Let's add monitor global variables to this struct. */
244244static struct {
245245 IOThread *mon_iothread;
246246- /* Bottom half to dispatch the requests received from IO thread */
246246+ /* Bottom half to dispatch the requests received from I/O thread */
247247 QEMUBH *qmp_dispatcher_bh;
248248 /* Bottom half to deliver the responses back to clients */
249249 QEMUBH *qmp_respond_bh;
···518518{
519519 if (mon->use_io_thr) {
520520 /*
521521- * If using IO thread, we need to queue the item so that IO
521521+ * If using I/O thread, we need to queue the item so that I/O
522522 * thread will do the rest for us. Take refcount so that
523523 * caller won't free the data (which will be finally freed in
524524 * responder thread).
···529529 qemu_bh_schedule(mon_global.qmp_respond_bh);
530530 } else {
531531 /*
532532- * If not using monitor IO thread, then we are in main thread.
532532+ * If not using monitor I/O thread, then we are in main thread.
533533 * Do the emission right away.
534534 */
535535 monitor_json_emitter_raw(mon, data);
···12691269 if (!mon->use_io_thr) {
12701270 /*
12711271 * Out-of-band only works with monitors that are
12721272- * running on dedicated IOThread.
12721272+ * running on dedicated I/O thread.
12731273 */
12741274 error_setg(errp, "This monitor does not support "
12751275 "out-of-band (OOB)");
···4403440344044404 if (monitor_is_qmp(mon)) {
44054405 /*
44064406- * Kick iothread to make sure this takes effect. It'll be
44064406+ * Kick I/O thread to make sure this takes effect. It'll be
44074407 * evaluated again in prepare() of the watch object.
44084408 */
44094409 aio_notify(iothread_get_aio_context(mon_global.mon_iothread));
···44224422 if (atomic_dec_fetch(&mon->suspend_cnt) == 0) {
44234423 if (monitor_is_qmp(mon)) {
44244424 /*
44254425- * For QMP monitors that are running in IOThread, let's
44254425+ * For QMP monitors that are running in I/O thread, let's
44264426 * kick the thread in case it's sleeping.
44274427 */
44284428 if (mon->use_io_thr) {
···4446444644474447 for (cap = 0; cap < QMP_CAPABILITY__MAX; cap++) {
44484448 if (!mon->use_io_thr && cap == QMP_CAPABILITY_OOB) {
44494449- /* Monitors that are not using IOThread won't support OOB */
44494449+ /* Monitors that are not using I/O thread won't support OOB */
44504450 continue;
44514451 }
44524452 qlist_append_str(cap_list, QMPCapability_str(cap));
···45874587 NULL);
4588458845894589 /*
45904590- * Unlike the dispatcher BH, this must be run on the monitor IO
45914591- * thread, so that monitors that are using IO thread will make
45924592- * sure read/write operations are all done on the IO thread.
45904590+ * Unlike the dispatcher BH, this must be run on the monitor I/O
45914591+ * thread, so that monitors that are using I/O thread will make
45924592+ * sure read/write operations are all done on the I/O thread.
45934593 */
45944594 mon_global.qmp_respond_bh = aio_bh_new(monitor_get_aio_context(),
45954595 monitor_qmp_bh_responder,
···46614661 if (mon->use_io_thr) {
46624662 /*
46634663 * When use_io_thr is set, we use the global shared dedicated
46644664- * IO thread for this monitor to handle input/output.
46644664+ * I/O thread for this monitor to handle input/output.
46654665 */
46664666 context = monitor_get_io_context();
46674667 /* We should have inited globals before reaching here. */
···47184718 /*
47194719 * We can't call qemu_chr_fe_set_handlers() directly here
47204720 * since during the procedure the chardev will be active
47214721- * and running in monitor iothread, while we'll still do
47214721+ * and running in monitor I/O thread, while we'll still do
47224722 * something before returning from it, which is a possible
47234723 * race too. To avoid that, we just create a BH to setup
47244724 * the handlers.
···47454745 Monitor *mon, *next;
4746474647474747 /*
47484748- * We need to explicitly stop the iothread (but not destroy it),
47494749- * cleanup the monitor resources, then destroy the iothread since
47484748+ * We need to explicitly stop the I/O thread (but not destroy it),
47494749+ * cleanup the monitor resources, then destroy the I/O thread since
47504750 * we need to unregister from chardev below in
47514751 * monitor_data_destroy(), and chardev is not thread-safe yet
47524752 */
47534753 iothread_stop(mon_global.mon_iothread);
4754475447554755 /*
47564756- * After we have IOThread to send responses, it's possible that
47574757- * when we stop the IOThread there are still replies queued in the
47564756+ * After we have I/O thread to send responses, it's possible that
47574757+ * when we stop the I/O thread there are still replies queued in the
47584758 * responder queue. Flush all of them. Note that even after this
47594759 * flush it's still possible that out buffer is not flushed.
47604760 * It'll be done in below monitor_flush() as the last resort.
···47704770 }
47714771 qemu_mutex_unlock(&monitor_lock);
4772477247734773- /* QEMUBHs needs to be deleted before destroying the IOThread. */
47734773+ /* QEMUBHs needs to be deleted before destroying the I/O thread */
47744774 qemu_bh_delete(mon_global.qmp_dispatcher_bh);
47754775 mon_global.qmp_dispatcher_bh = NULL;
47764776 qemu_bh_delete(mon_global.qmp_respond_bh);