GNOME Bugzilla – Bug 697386
Except const argument with atomic is not lock free
Last modified: 2015-08-27 16:09:08 UTC
Much like the Bug 692583 [0], which was fixed in commit cf68300d27784ab5baaf6ef4761cead0ec404b1f [1] in certain cases when glib_cvs_g_atomic_lock_free is set to no and pthread is used the function implementations of g_atomic_pointer_get and g_atomic_int_get do not match their macro counter parts. The attached patch adds const to the function implementation in these cases. [0] https://bugzilla.gnome.org/show_bug.cgi?id=692583 [1] https://git.gnome.org/browse/glib/patch/glib/gatomic.c?id=cf68300d27784ab5baaf6ef4761cead0ec404b1f
Created attachment 240785 [details] [review] g_atomic_int_get and g_atomic_pointer_get const patch. g_atomic_int_get and g_atomic_pointer_get const patch.
Review of attachment 240785 [details] [review]: Yes, this looks right.
Review of attachment 240785 [details] [review]: 'oops'. Thanks for catching this. Please add an appropriate message and commit (or if you don't have access, attach a git-format patch here and I'll push it for you).
(In reply to comment #3) > Review of attachment 240785 [details] [review]: > > 'oops'. > > Thanks for catching this. > > Please add an appropriate message and commit (or if you don't have access, > attach a git-format patch here and I'll push it for you). git format-patch attached. Hopefully I did it correctly.
Created attachment 240789 [details] [review] git format-patch
Ryan, can I push this? (we already patched our glib package the same way in OpenBSD)
Patch pushed, aba02c5 Ryan, it seems I have no right to close tickets I don't own in BZ. Could you close it please. Thank you.
Thanks.
*** Bug 701898 has been marked as a duplicate of this bug. ***