Skip to contentSkip to conversation

main loop: add missing documentation links to GS/IO macros

PATCH Applied Emanuele Giuseppe Esposito 3 participants 3 messages Jun 9, 2022 – Aug 2, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 main loop: add missing documentation links to GS/IO macros

If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE definition, we just find that they "mark and check that the function is part of the {category} API".
However, ther is no definition on what {category} API is, they are in include/block/block-*.h
Therefore, add a comment that refers to such documentation.

---
 include/qemu/main-loop.h | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
include/qemu/main-loop.h +15 -3
index 5518845299..c50d1b7e3a 100644
@@ -279,7 +279,11 @@ bool qemu_mutex_iothread_locked(void);
  */
 bool qemu_in_main_thread(void);
 
-/* Mark and check that the function is part of the global state API. */
+/*
+ * Mark and check that the function is part of the Global State API.
+ * Please refer to include/block/block-global-state.h for more
+ * information about GS API.
+ */
 #ifdef CONFIG_COCOA
 /*
  * When using the Cocoa UI, addRemovableDevicesMenuItems() is called from
@@ -298,13 +302,21 @@ bool qemu_in_main_thread(void);
     } while (0)
 #endif /* CONFIG_COCOA */
 
-/* Mark and check that the function is part of the I/O API. */
+/*
+ * Mark and check that the function is part of the I/O API.
+ * Please refer to include/block/block-io.h for more
+ * information about IO API.
+ */
 #define IO_CODE()                                                   \
     do {                                                            \
         /* nop */                                                   \
     } while (0)
 
-/* Mark and check that the function is part of the "I/O OR GS" API. */
+/*
+ * Mark and check that the function is part of the "I/O OR GS" API.
+ * Please refer to include/block/block-io.h for more
+ * information about "IO or GS" API.
+ */
 #define IO_OR_GS_CODE()                                             \
     do {                                                            \
         /* nop */                                                   \
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Emanuele Giuseppe Esposito

If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE definition, we just find that they "mark and check that the function is part of the {category} API".
However, ther is no definition on what {category} API is, they are in include/block/block-*.h
Therefore, add a comment that refers to such documentation.

---
 include/qemu/main-loop.h | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

Great, thank you for the patch!

Applied
#2 lore raw
In reply to Emanuele Giuseppe Esposito

Am 09.06.2022 um 14:22 hat Emanuele Giuseppe Esposito geschrieben:

Quoted 8 lines

If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE definition, we just find that they "mark and check that the function is part of the {category} API".
However, ther is no definition on what {category} API is, they are in include/block/block-*.h
Therefore, add a comment that refers to such documentation.

Thanks, applied to the block branch.

Kevin