Debian Codegraph @

debian/patches/sync_instead_of_atomic

raw symbols SCIP
1 From: Michael R. Crusoe <[email protected]>
2 Subject: fix compatibility on mipsel
3 Forwarded: https://github.com/lh3/fermi-lite/pull/13
4 --- fermi-lite.orig/unitig.c
5 +++ fermi-lite/unitig.c
6 @@ -71,7 +71,7 @@
7 {
8 uint64_t *p = bits + (x>>6);
9 uint64_t z = 1LLU<<(x&0x3f);
10 - __sync_fetch_and_or(p, z);
11 + __atomic_fetch_or(p, z, __ATOMIC_SEQ_CST);
12 }
13
14 static inline void set_bits(uint64_t *bits, const rldintv_t *p)
15 @@ -389,7 +389,7 @@
16 magv_t *q;
17 p[0] = w->visited + (d->z.k[0]>>6); x[0] = 1LLU<<(d->z.k[0]&0x3f);
18 p[1] = w->visited + (d->z.k[1]>>6); x[1] = 1LLU<<(d->z.k[1]&0x3f);
19 - if ((__sync_fetch_and_or(p[0], x[0])&x[0]) || (__sync_fetch_and_or(p[1], x[1])&x[1])) return;
20 + if ((__atomic_fetch_or(p[0], x[0], __ATOMIC_SEQ_CST)&x[0]) || (__atomic_fetch_or(p[1], x[1], __ATOMIC_SEQ_CST)&x[1])) return;
21 d->z.len = d->str.l;
22 if (d->max_l < d->str.m) {
23 d->max_l = d->str.m;