All of lore.kernel.org
 help / color / mirror / Atom feed
* Safe to use stdatomic.h?
@ 2017-03-20 20:18 Ben Peart
  2017-03-20 20:27 ` Jeff King
  2017-03-20 23:22 ` brian m. carlson
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Peart @ 2017-03-20 20:18 UTC (permalink / raw)
  To: 'git'; +Cc: Jeff Hostetler (jeffhost@microsoft.com), Ben Peart

My college Jeff is working on a patch series to further parallelize the
loading of the index.  As part of that patch, it would be nice to use the
atomic_fetch_add function as that would be more efficient than creating a
mutex simply to protect a variable so that it can be incremented.  I haven't
seen any use of atomics yet in Git, nor anything that includes
<stdatomic.h>.

GCC has supported them since 4.9 and Clang has supported them by default
since 3.3.  Are there any compilers currently in use by Git that don't
support these C11 functions?

Thanks,

Ben



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-21  1:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 20:18 Safe to use stdatomic.h? Ben Peart
2017-03-20 20:27 ` Jeff King
2017-03-20 23:22 ` brian m. carlson
2017-03-21  1:59   ` Eric Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.