@@ -133,12 +133,16 @@ struct AioContext {
133
133
AioHandlerList deleted_aio_handlers ;
134
134
135
135
/* Used to avoid unnecessary event_notifier_set calls in aio_notify;
136
- * accessed with atomic primitives. If this field is 0, everything
137
- * (file descriptors, bottom halves, timers) will be re-evaluated
138
- * before the next blocking poll(), thus the event_notifier_set call
139
- * can be skipped. If it is non-zero, you may need to wake up a
140
- * concurrent aio_poll or the glib main event loop, making
141
- * event_notifier_set necessary.
136
+ * only written from the AioContext home thread, or under the BQL in
137
+ * the case of the main AioContext. However, it is read from any
138
+ * thread so it is still accessed with atomic primitives.
139
+ *
140
+ * If this field is 0, everything (file descriptors, bottom halves,
141
+ * timers) will be re-evaluated before the next blocking poll() or
142
+ * io_uring wait; therefore, the event_notifier_set call can be
143
+ * skipped. If it is non-zero, you may need to wake up a concurrent
144
+ * aio_poll or the glib main event loop, making event_notifier_set
145
+ * necessary.
142
146
*
143
147
* Bit 0 is reserved for GSource usage of the AioContext, and is 1
144
148
* between a call to aio_ctx_prepare and the next call to aio_ctx_check.
@@ -681,19 +685,6 @@ void aio_co_enter(AioContext *ctx, struct Coroutine *co);
681
685
*/
682
686
AioContext * qemu_get_current_aio_context (void );
683
687
684
- /**
685
- * in_aio_context_home_thread:
686
- * @ctx: the aio context
687
- *
688
- * Return whether we are running in the thread that normally runs @ctx. Note
689
- * that acquiring/releasing ctx does not affect the outcome, each AioContext
690
- * still only has one home thread that is responsible for running it.
691
- */
692
- static inline bool in_aio_context_home_thread (AioContext * ctx )
693
- {
694
- return ctx == qemu_get_current_aio_context ();
695
- }
696
-
697
688
/**
698
689
* aio_context_setup:
699
690
* @ctx: the aio context
0 commit comments