[PATCH] Optimized __cxa_guard_{acquire,release,abort} for Linux
Jason Merrill
jason@redhat.com
Mon Jan 7 16:16:00 GMT 2008
Jakub Jelinek wrote:
> If we can trust __cxa_guard_abort and __cxa_guard_release will be always
> called by a thread which set pending_bit and guard_bit at that point is not
> set, that loop could be probably simplified.
That's the design. I think it's appropriate to optimize this case
rather than add extra atomic ops in order to make the locking code more
robust in the presence of codegen bugs; do you agree?
This patch looks good to me.
Jason
More information about the Libstdc++
mailing list