Skip to content

Commit

Permalink
Merge pull request numpy#27982 from charris/backport-27947
Browse files Browse the repository at this point in the history
BUG:fix compile error libatomic link test to meson.build
  • Loading branch information
charris authored Dec 11, 2024
2 parents de6597f + e064b9a commit cab0484
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions numpy/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,18 @@ null_dep = dependency('', required : false)
atomic_dep = null_dep
code_non_lockfree = '''
#include <stdint.h>
#include <stddef.h>
int main() {
struct {
void *p;
uint8_t u8v;
} x;
x.p = NULL;
x.u8v = 0;
uint8_t res = __atomic_load_n(x.u8v, __ATOMIC_SEQ_CST);
__atomic_store_n(x.u8v, 1, ATOMIC_SEQ_CST);
void *p = __atomic_load_n(x.p, __ATOMIC_SEQ_CST);
__atomic_store_n((void **)x.p, NULL, __ATOMIC_SEQ_CST)
uint8_t res = __atomic_load_n(&x.u8v, __ATOMIC_SEQ_CST);
__atomic_store_n(&x.u8v, 1, __ATOMIC_SEQ_CST);
void *p = __atomic_load_n((void **)x.p, __ATOMIC_SEQ_CST);
__atomic_store_n((void **)x.p, NULL, __ATOMIC_SEQ_CST);
return 0;
}
'''
Expand Down

0 comments on commit cab0484

Please sign in to comment.