Paolo Bonzini
9ba95e25b7
gmain: only signal GWakeup right before or during a blocking poll
...
Since commit e4ee307 ("Do not wake up main loop if change is from same
thread", bug 761102), GMainContext uses context->owner to decide if the
event loop is being run in the current thread. However, what really
matters is the phase in the prepare/query/poll/check/dispatch sequence.
Wakeups are only needed between the end of prepare and the end of poll,
and then only if prepare found that no sources were ready.
There is no need to take threads into account, because prepare, check
and all callers of conditional_wakeup all look at the new need_wakeup
flag inside LOCK_CONTEXT/UNLOCK_CONTEXT.
With this change, g_main_context_is_owner and g_main_context_wait are
the only functions for which acquire/release matters, just like before
commit e4ee307.
Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
2017-04-11 13:27:31 -04:00
..
2017-03-16 13:50:19 +00:00
2017-01-04 19:12:57 +01:00
2017-03-09 17:18:55 +00:00
2014-01-31 14:31:55 +01:00
2016-01-18 18:37:28 +00:00
2017-03-23 15:34:11 +00:00
2013-05-31 23:12:15 -04:00
2011-06-12 16:17:30 -04:00
2016-11-09 15:11:53 +00:00
2014-06-28 13:43:23 -04:00
2016-12-02 19:10:39 +00:00
2014-02-01 20:46:29 -05:00
2015-09-21 06:44:58 -04:00
2015-06-29 08:20:26 -07:00
2014-01-31 14:31:55 +01:00
2016-11-22 13:11:24 -05:00
2016-11-22 13:11:24 -05:00
2016-04-27 13:17:28 +00:00
2015-07-09 10:39:42 -04:00
2017-03-23 15:34:11 +00:00
2014-01-31 14:31:55 +01:00
2015-11-07 10:48:32 +01:00
2014-01-31 14:31:55 +01:00
2017-01-04 19:12:57 +01:00
2017-01-04 19:12:57 +01:00
2013-11-20 09:16:16 -05:00
2015-11-07 10:48:32 +01:00
2014-01-31 14:31:55 +01:00
2016-03-26 08:52:40 -04:00
2017-01-04 19:12:56 +01:00
2014-01-31 14:31:55 +01:00
2017-02-27 10:19:19 +00:00
2017-02-26 11:52:17 +01:00
2015-11-12 15:01:54 +08:00
2017-04-06 19:17:03 +02:00
2017-04-06 19:17:03 +02:00
2016-11-22 14:14:37 -08:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-04-07 08:43:24 -05:00
2014-01-31 14:31:55 +01:00
2017-04-03 08:31:37 -07:00
2017-01-04 19:12:57 +01:00
2017-04-06 19:17:56 +02:00
2017-04-06 19:17:56 +02:00
2016-09-21 18:30:52 +02:00
2017-04-06 19:19:20 +02:00
2017-04-06 19:19:20 +02:00
2016-11-22 14:14:37 -08:00
2017-01-04 19:12:56 +01:00
2017-04-08 01:16:04 -04:00
2017-04-06 19:21:20 +02:00
2016-11-22 14:14:37 -08:00
2014-01-31 14:31:55 +01:00
2017-03-23 15:55:31 +00:00
2014-01-31 14:31:55 +01:00
2017-02-26 11:53:22 +01:00
2016-07-16 20:48:41 -04:00
2015-11-07 10:48:32 +01:00
2014-01-31 14:31:55 +01:00
2016-12-02 19:10:45 +00:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-11-22 14:14:37 -08:00
2017-04-06 19:22:43 +02:00
2014-01-31 14:31:55 +01:00
2017-04-06 19:22:43 +02:00
2017-03-02 10:46:51 +01:00
2017-01-04 19:12:56 +01:00
2016-05-23 10:52:10 -04:00
2016-09-23 22:46:30 -07:00
2014-01-31 14:31:55 +01:00
2015-09-22 11:18:30 -04:00
2016-11-22 14:14:37 -08:00
2016-04-26 10:40:07 +00:00
2015-01-30 16:52:36 +01:00
2015-10-08 12:32:58 +01:00
2015-10-07 23:39:29 -04:00
2017-04-08 01:02:31 -04:00
2014-02-14 21:49:42 -05:00
2017-02-06 14:40:38 +01:00
2011-06-07 08:55:31 +08:00
2016-11-23 10:50:39 +00:00
2016-06-29 15:16:52 +01:00
2013-01-13 13:11:57 -05:00
2015-03-03 18:40:33 +00:00
2014-01-31 14:31:55 +01:00
2016-07-13 11:44:34 +08:00
2014-01-31 14:31:55 +01:00
2017-04-11 13:27:31 -04:00
2016-11-09 10:38:20 -05:00
2016-10-12 21:30:42 +02:00
2014-01-31 14:31:55 +01:00
2017-03-02 10:46:51 +01:00
2017-01-04 19:12:56 +01:00
2016-11-22 14:14:37 -08:00
2015-11-07 10:48:32 +01:00
2017-03-24 15:08:16 +00:00
2016-09-09 09:07:50 -03:00
2008-04-08 02:59:05 +00:00
2014-02-19 19:41:52 -05:00
2015-11-07 10:48:32 +01:00
2016-12-02 19:10:39 +00:00
2015-03-13 09:10:25 +00:00
2016-11-22 14:14:37 -08:00
2014-01-31 14:31:55 +01:00
2016-04-28 14:22:51 +00:00
2015-11-02 20:03:38 +02:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2015-11-07 10:48:32 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2015-11-07 10:48:32 +01:00
2014-01-31 14:31:55 +01:00
2016-11-22 14:14:37 -08:00
2014-01-31 14:31:55 +01:00
2014-11-09 20:42:50 +01:00
2014-04-15 22:19:07 +02:00
2016-02-24 11:27:09 +01:00
2014-01-31 14:31:55 +01:00
2017-01-12 09:04:39 +00:00
2017-01-04 19:12:57 +01:00
2014-05-31 10:54:02 -04:00
2014-01-31 14:31:55 +01:00
2016-09-21 18:31:04 +02:00
2016-11-22 14:14:37 -08:00
2015-10-15 12:54:09 -07:00
2017-01-04 19:12:56 +01:00
2017-01-04 19:12:56 +01:00
2015-11-07 10:48:32 +01:00
2015-01-14 16:21:00 +01:00
2015-02-11 09:17:33 +00:00
2014-01-31 14:31:55 +01:00
2017-01-04 19:12:56 +01:00
2017-04-06 19:24:00 +02:00
2017-01-04 19:12:56 +01:00
2017-04-06 19:24:00 +02:00
2017-01-04 19:12:56 +01:00
2017-01-04 19:12:56 +01:00
2016-12-02 19:10:39 +00:00
2015-09-22 11:18:30 -04:00
2016-02-02 17:38:05 +01:00
2014-01-31 14:31:55 +01:00
2014-02-19 19:41:52 -05:00
2014-01-31 14:31:55 +01:00
2015-11-05 12:53:19 +01:00
2016-04-27 13:17:28 +00:00
2017-03-05 12:24:37 +00:00
2016-12-02 19:10:39 +00:00
2016-04-27 13:17:28 +00:00
2016-04-27 13:17:28 +00:00
2016-11-22 14:14:37 -08:00
2015-02-10 23:17:07 +08:00
2015-06-29 08:20:26 -07:00
2015-06-29 08:20:26 -07:00
2017-01-04 19:12:56 +01:00
2014-02-19 19:41:52 -05:00
2014-01-31 14:31:55 +01:00
2016-11-22 14:14:37 -08:00
2014-01-31 14:31:55 +01:00
2014-02-20 18:27:24 -05:00
2016-11-22 14:14:37 -08:00
2015-11-16 13:14:19 -05:00
2015-11-16 13:14:19 -05:00
2015-11-07 10:48:32 +01:00
2014-01-31 14:31:55 +01:00
2016-07-23 09:27:52 -04:00
2017-01-04 19:12:56 +01:00
2016-09-21 18:31:04 +02:00
2016-09-21 18:31:04 +02:00
2017-03-16 13:50:19 +00:00
2014-01-31 14:31:55 +01:00
2017-03-21 08:43:43 +00:00
2014-06-28 12:49:38 -04:00
2017-01-04 19:12:56 +01:00
2016-09-21 18:31:04 +02:00
2016-12-02 19:10:44 +00:00
2016-11-22 14:14:37 -08:00
2014-01-31 14:31:55 +01:00
2017-03-20 11:07:48 +00:00
2016-06-04 20:38:33 +02:00
2016-04-27 13:17:27 +00:00
2017-02-06 14:40:38 +01:00
2017-02-06 14:40:38 +01:00
2015-11-07 10:48:32 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-11-22 14:14:37 -08:00
2016-11-22 14:14:37 -08:00
2014-01-31 14:31:55 +01:00
2017-04-04 15:10:01 +01:00
2016-07-21 14:06:58 +02:00
2016-11-22 14:14:37 -08:00
2016-09-09 08:50:55 -03:00
2016-11-22 14:14:37 -08:00
2014-01-31 14:31:55 +01:00
2014-05-31 10:54:02 -04:00
2014-01-31 14:31:55 +01:00
2017-03-23 16:21:28 +00:00
2014-06-21 17:41:31 +01:00
2014-01-31 14:31:55 +01:00
2017-04-06 19:25:09 +02:00
2017-04-06 19:25:09 +02:00
2016-05-23 10:52:10 -04:00
2017-03-03 20:08:42 +00:00
2011-11-16 09:10:46 +01:00
2014-02-20 18:27:24 -05:00
2014-12-12 11:01:37 -05:00
2016-08-13 10:31:26 +02:00