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 711755 - private: Use threading primitives correctly in private test
private: Use threading primitives correctly in private test
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 711744
 
 
Reported: 2013-11-09 23:52 UTC by Stef Walter
Modified: 2013-11-11 07:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
private: Use threading primitives correctly in private test (2.05 KB, patch)
2013-11-09 23:53 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2013-11-09 23:52:59 UTC
The glib/test/private test currently does unspeakable things
with mutexes and privates :)
Comment 1 Stef Walter 2013-11-09 23:53:03 UTC
Created attachment 259367 [details] [review]
private: Use threading primitives correctly in private test

We shouldn't be clearing statically allocated mutexes, and also
no auto-initialization of stack allocated GPrivate.
Comment 2 Dan Winship 2013-11-10 16:29:30 UTC
Comment on attachment 259367 [details] [review]
private: Use threading primitives correctly in private test

looks good except for the commit message:

>We shouldn't be clearing statically allocated mutexes, and also
>no auto-initialization of stack allocated GPrivate.

there are no stack-allocated GPrivates here...

>+      g_private_set (&private2, GINT_TO_POINTER(v));

while you're here, can you fix all the INT_TO_POINTER / POINTER_TO_INT calls to have a space before the open paren? (as a separate patch, doesn't need to be reviewed)
Comment 3 Stef Walter 2013-11-11 07:21:57 UTC
(In reply to comment #2)
> there are no stack-allocated GPrivates here...

Fixed commit message.

> while you're here, can you fix all the INT_TO_POINTER / POINTER_TO_INT calls to
> have a space before the open paren? (as a separate patch, doesn't need to be
> reviewed)

Done for all the lines I modified in the patch.
Comment 4 Stef Walter 2013-11-11 07:22:11 UTC
Attachment 259367 [details] pushed as e34d74b - private: Use threading primitives correctly in private test