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 711753 - gthread-posix: Don't use gslice allocated GRecMutex
gthread-posix: Don't use gslice allocated GRecMutex
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gthread
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 711744
 
 
Reported: 2013-11-09 23:45 UTC by Stef Walter
Modified: 2013-11-26 19:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gthread-posix: Don't use gslice allocated GRecMutex (1.21 KB, patch)
2013-11-09 23:45 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2013-11-09 23:45:23 UTC
Unlike the other threading primitives GRecMutex is defined in
gslice allocated memory.

This is awkward because gslice takes locks as well, albeit not a
GRecMutex.

Was discovered during implementation of GCleanup and prevents
us from doing orderly cleanup. That is, first we want to cleanup gslice,
and then cleanup the threading primitives after that.
Comment 1 Stef Walter 2013-11-09 23:45:27 UTC
Created attachment 259361 [details] [review]
gthread-posix: Don't use gslice allocated GRecMutex

This leads to problems during cleanup, and seems strange
to have locks defined in terms of things that need locking.
Comment 2 Dan Winship 2013-11-10 16:30:48 UTC
Comment on attachment 259361 [details] [review]
gthread-posix: Don't use gslice allocated GRecMutex

I'm pretty sure this is right, but maybe Ryan should confirm that this was an oversight, not something intentional
Comment 3 Matthias Clasen 2013-11-24 14:54:34 UTC
Ryan, any word on this ?
Comment 4 Allison Karlitskaya (desrt) 2013-11-25 12:33:44 UTC
Review of attachment 259361 [details] [review]:

I think I did it this way because recursive mutexes don't get used, in turn, from GSlice.  Consistency here is nice though, so go ahead.
Comment 5 Stef Walter 2013-11-26 19:35:32 UTC
Attachment 259361 [details] pushed as c9cfa7d - gthread-posix: Don't use gslice allocated GRecMutex