-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cas ptr #5
Comments
Hi Matthew, Sat, 8 Sep 2012 11:37:14 -0700 Matthew Wilson notifications@github.com:
This should be refined, I think. AO_t is typically size_t which should be (normally) the same size of pointer. Also, there could be atomic operations defined for other types (like char, short, int) on some platforms.
Yes, cast between a pointer type and AO_t is valid both on 32- and 64-bit targets.
Regards, |
excellent; thanks |
AO_compare_and_swap seems not to be implemented on msvc 32-bit. (tested with vs2010). Is it supposed to be? |
oops, reopened the wrong one |
The header says "All operations operate on unsigned AO_t, which is the natural word size, and usually unsigned long".
Does this mean it can't CAS a pointer, or that it can? The APR has
apr underscore atomic underscore casptr
see http://apr.apache.org/docs/apr/trunk/group double underscore apr double underscore atomic.html
, which works for me on 64-bit. But I'm looking at using this library instead for the atomic operations because of the memory barrier precision. So I'm just wondering whether this library will let me CAS pointers on 64-bit.
Thanks again!
The text was updated successfully, but these errors were encountered: