This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Optimized __cxa_guard_{acquire,release,abort} for Linux
- From: Jason Merrill <jason at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Paolo Carlini <pcarlini at suse dot de>, Richard Guenther <richard dot guenther at gmail dot com>, Benjamin Kosnik <bkoz at redhat dot com>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Fri, 04 Jan 2008 14:50:30 -0500
- Subject: Re: [PATCH] Optimized __cxa_guard_{acquire,release,abort} for Linux
- References: <20071231133948.GQ20451@devserv.devel.redhat.com> <84fc9c000712310800pb646954y47cd3c52fcf0dd4f@mail.gmail.com> <47791391.9050901@suse.de> <20080102102916.GT20451@devserv.devel.redhat.com>
This looks great, and I think should definitely go into 4.3. One
question: why do you need all the cmpxchg in the abort/unlock functions?
If we're in those functions, we already got the lock, so no other
thread should be modifying the guard. Can't we just do a non-atomic
assignment and then FUTEX_WAKE?
Jason