Skip to content

Commit c5f57ed

Browse files
author
Markus Armbruster
committed
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>
1 parent c069821 commit c5f57ed

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

monitor.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ struct Monitor {
243243
/* Let's add monitor global variables to this struct. */
244244
static struct {
245245
IOThread *mon_iothread;
246-
/* Bottom half to dispatch the requests received from IO thread */
246+
/* 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;
@@ -518,7 +518,7 @@ static void monitor_json_emitter(Monitor *mon, QObject *data)
518518
{
519519
if (mon->use_io_thr) {
520520
/*
521-
* If using IO thread, we need to queue the item so that IO
521+
* 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).
@@ -529,7 +529,7 @@ static void monitor_json_emitter(Monitor *mon, QObject *data)
529529
qemu_bh_schedule(mon_global.qmp_respond_bh);
530530
} else {
531531
/*
532-
* If not using monitor IO thread, then we are in main thread.
532+
* 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);
@@ -1269,7 +1269,7 @@ static void qmp_caps_check(Monitor *mon, QMPCapabilityList *list,
12691269
if (!mon->use_io_thr) {
12701270
/*
12711271
* Out-of-band only works with monitors that are
1272-
* running on dedicated IOThread.
1272+
* running on dedicated I/O thread.
12731273
*/
12741274
error_setg(errp, "This monitor does not support "
12751275
"out-of-band (OOB)");
@@ -4403,7 +4403,7 @@ int monitor_suspend(Monitor *mon)
44034403

44044404
if (monitor_is_qmp(mon)) {
44054405
/*
4406-
* Kick iothread to make sure this takes effect. It'll be
4406+
* 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));
@@ -4422,7 +4422,7 @@ void monitor_resume(Monitor *mon)
44224422
if (atomic_dec_fetch(&mon->suspend_cnt) == 0) {
44234423
if (monitor_is_qmp(mon)) {
44244424
/*
4425-
* For QMP monitors that are running in IOThread, let's
4425+
* 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) {
@@ -4446,7 +4446,7 @@ static QObject *get_qmp_greeting(Monitor *mon)
44464446

44474447
for (cap = 0; cap < QMP_CAPABILITY__MAX; cap++) {
44484448
if (!mon->use_io_thr && cap == QMP_CAPABILITY_OOB) {
4449-
/* Monitors that are not using IOThread won't support OOB */
4449+
/* Monitors that are not using I/O thread won't support OOB */
44504450
continue;
44514451
}
44524452
qlist_append_str(cap_list, QMPCapability_str(cap));
@@ -4587,9 +4587,9 @@ static void monitor_iothread_init(void)
45874587
NULL);
45884588

45894589
/*
4590-
* Unlike the dispatcher BH, this must be run on the monitor IO
4591-
* thread, so that monitors that are using IO thread will make
4592-
* sure read/write operations are all done on the IO thread.
4590+
* Unlike the dispatcher BH, this must be run on the monitor I/O
4591+
* thread, so that monitors that are using I/O thread will make
4592+
* 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,
@@ -4661,7 +4661,7 @@ static void monitor_qmp_setup_handlers_bh(void *opaque)
46614661
if (mon->use_io_thr) {
46624662
/*
46634663
* When use_io_thr is set, we use the global shared dedicated
4664-
* IO thread for this monitor to handle input/output.
4664+
* 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. */
@@ -4718,7 +4718,7 @@ void monitor_init(Chardev *chr, int flags)
47184718
/*
47194719
* We can't call qemu_chr_fe_set_handlers() directly here
47204720
* since during the procedure the chardev will be active
4721-
* and running in monitor iothread, while we'll still do
4721+
* 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.
@@ -4745,16 +4745,16 @@ void monitor_cleanup(void)
47454745
Monitor *mon, *next;
47464746

47474747
/*
4748-
* We need to explicitly stop the iothread (but not destroy it),
4749-
* cleanup the monitor resources, then destroy the iothread since
4748+
* We need to explicitly stop the I/O thread (but not destroy it),
4749+
* 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);
47544754

47554755
/*
4756-
* After we have IOThread to send responses, it's possible that
4757-
* when we stop the IOThread there are still replies queued in the
4756+
* After we have I/O thread to send responses, it's possible that
4757+
* 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.
@@ -4770,7 +4770,7 @@ void monitor_cleanup(void)
47704770
}
47714771
qemu_mutex_unlock(&monitor_lock);
47724772

4773-
/* QEMUBHs needs to be deleted before destroying the IOThread. */
4773+
/* 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);

0 commit comments

Comments
 (0)