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 659423 - Use adaptive mutexes when available
Use adaptive mutexes when available
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gthread
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-09-18 23:03 UTC by Matthias Clasen
Modified: 2011-09-22 04:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use adaptive mutexes when available (1.68 KB, patch)
2011-09-18 23:03 UTC, Matthias Clasen
accepted-commit_now Details | Review
Use adaptive mutexes when available (1.73 KB, patch)
2011-09-22 04:55 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2011-09-18 23:03:07 UTC
These are supposedly better on multi-cpu systems - and who doesn't
have multiple cpus nowadays. One single-processor systems, they
are identical to normal mutexes.
Comment 1 Matthias Clasen 2011-09-18 23:03:10 UTC
Created attachment 196891 [details] [review]
Use adaptive mutexes when available
Comment 2 Colin Walters 2011-09-19 12:59:32 UTC
Review of attachment 196891 [details] [review]:

Link to who says this?  

From GNU libc "Mutexes" info page, it says the default is "timed" mutexes.  The adaptive ones don't support pthread_mutex_timedlock(), but we don't call that, so things are fine.

5 years later someone will quite possibly want to know what "supposedly" means - can you update the commit message with where you saw it and/or the above data?
Comment 3 Emmanuele Bassi (:ebassi) 2011-09-19 13:19:56 UTC
this NSPR bug:

 https://bugzilla.mozilla.org/show_bug.cgi?id=132089

has a link to an interesting post on comp.programming.threads with further information.
Comment 4 Colin Walters 2011-09-19 14:32:56 UTC
Perfect!  That link makes a lot of sense.  A simple:

See https://bugzilla.mozilla.org/show_bug.cgi?id=132089

In the commit message would work for me.
Comment 5 Matthias Clasen 2011-09-22 04:55:00 UTC
The following fix has been pushed:
cedc822 Use adaptive mutexes when available
Comment 6 Matthias Clasen 2011-09-22 04:55:03 UTC
Created attachment 197208 [details] [review]
Use adaptive mutexes when available

These are supposedly better on multi-cpu systems - and who doesn't
have multiple cpus nowadays. One single-processor systems, they
are identical to normal mutexes.
See e.g. http://bugzilla.mozilla.org/show_bug.cgi?id=132089