This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [RFC] Avoid unnecessary futex_wake syscalls when all threads are busy waiting


On Fri, Jul 15, 2011 at 12:02:06PM +0200, Paolo Bonzini wrote:
> On 07/15/2011 11:37 AM, Jakub Jelinek wrote:
> >While __sync_lock_test_and_set isn't a full barrier on all targets,
> >I hope it doesn't matter, because the inline caller has already done one
> >__sync_val_compare_and_swap which is a full barrier.
> 
> Why not take the occasion to add the __sync_swap extension that
> clang added already?

I think Andrew and Aldy are already extending all the __sync_* builtins
to have extra argument with required barrier behavior bits for C++ memory
model.

	Jakub


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