This is the mail archive of the gcc@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] |
On Tue, Mar 04, 2008 at 04:37:29PM +0000, Andrew Haley wrote:We already have these in gcc, and they're even documented.Typically those would be found in asm statements. I suspect it would be valuable to have standardized primitives for atomic actions (semaphores, spinlocks, test-and-set primitives, circular buffers, pick one).
We don't have atomic read or atomic write builtins (ok, you could abuse __sync_fetch_and_add (&x, 0) for atomic read and a loop with __sync_compare_and_swap_val for atomic store, but that's a horrible overkill.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |