__sync_bool_compare_and_swap() With a Pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

According to http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html, __sync_bool_compare_and_swap() supports int, long, long long, and their unsigned counterparts, and GCC will allow any integral scalar or pointer type that is 1, 2, 4 or 8 bytes in length.

I wonder in what situation the pointer type won't be 1, 2, 4 or 8 bytes in length.  Let's say I am running on a 64-bit Intel CPU.


Thanks in advance.


Cheers,
Hei




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux