This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Optimized __cxa_guard_{acquire,release,abort} for Linux


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]