None of these compile for C on NonStop.
What about the atomic intrinsics mentioned in the HPE docs?
For example:
#include <stdio.h>
#include <stdint.h>
int main(void) {
int32_t x = 0;
int32_t old = _atmAdd32(&x, 1);
printf("_atmAdd32 %d %d\n", (int)old, (int)x);
return 0;
}
Yes, this might compile, I have seen these declarations in a header file.
This compiled fine for NonStop. So you are suggesting to use these atomic intrinsics in place of atomics in pyatomic_std.h. Although I doubt there is full support. To begin with this can be done.
Yes, I’m suggesting you implement the pyatomic.h functions in terms of the available atomic intrinsics.
1 Like
Thank you @colesbury , @Rosuav for your help, much appreciated.
1 Like
I’d also suggest not writing special _acquire/_release/_relaxed functions. Those are optimisations so it’ll work fine if you fall back to the plain version.
Noted, Thanks.![]()