After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678052 - g_wakeup_acknowledge is called too often.
g_wakeup_acknowledge is called too often.
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: mainloop
2.32.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-06-13 19:57 UTC by Ken Brown
Modified: 2012-06-19 13:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch. (415 bytes, patch)
2012-06-13 19:57 UTC, Ken Brown
accepted-commit_now Details | Review

Description Ken Brown 2012-06-13 19:57:00 UTC
Created attachment 216345 [details] [review]
Patch.

I think there was a typo in the following commit:

http://git.gnome.org/browse/glib/commit/?h=glib-2-32&id=7eae486179e2799c369ed9ffcea663bf9161ce79

"events" should be "revents".  Since context->wake_up_rec.events is always nonzero at this point, the result of the typo is that g_wakeup_acknowledge is called much more often than necessary.
Comment 1 Allison Karlitskaya (desrt) 2012-06-14 14:10:30 UTC
I agree.

What's the deal with reorganising the 'else' part, though?  If you're right (and I think you are) the assignment was *never* occurring before.  Now you want it to always occur.  Explain?
Comment 2 Allison Karlitskaya (desrt) 2012-06-14 14:12:07 UTC
Review of attachment 216345 [details] [review]:

Sorry.  My bad.  I read the linked commit as if it were your proposed patch.  :)

What you have here looks correct.  Please commit.
Comment 3 Ken Brown 2012-06-14 15:55:00 UTC
(In reply to comment #2)
> Review of attachment 216345 [details] [review]:
> 
> Sorry.  My bad.  I read the linked commit as if it were your proposed patch. 
> :)
> 
> What you have here looks correct.  Please commit.

I don't have commit privileges (to the best of my knowledge).  Can you commit it for me?
Comment 4 Ken Brown 2012-06-16 12:23:48 UTC
Thanks for applying the patch.  One minor nitpick: The commit message is misleading.  The problem wasn't that we were waking up unnecessarily.  The problem was that we were *acknowledging* a wakeup when a wakeup hadn't in fact occurred.
Comment 5 Matthias Clasen 2012-06-19 13:37:41 UTC
Oh, sorry. Next time, please provide a git-formatted patch, then I won't have to make up  my own commit message.