This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/4274] Performance issue: pthread_cond_signal() causes three context switches instead of one
- From: "bart dot vanassche at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 28 Aug 2007 13:02:35 -0000
- Subject: [Bug nptl/4274] Performance issue: pthread_cond_signal() causes three context switches instead of one
- References: <20070325101629.4274.bart.vanassche@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From bart dot vanassche at gmail dot com 2007-08-28 13:02 -------
(In reply to comment #10)
> If you want to avoid that, simply don't call pthread_cond_signal with the
> mutex held.
Sorry Jakub, but IMHO that is the wrong way to go. It is not possible to write a
reliable POSIX threads program when not holding a mutex while calling
pthread_cond_signal(). Signals can easily be lost when you do that.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4274
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.