[PATCH] elf: Use C11 like atomics on _dl_mcount

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Sep 1 12:21:52 GMT 2022


Hi Adhemerval,

-	      newfromidx = catomic_exchange_and_add (&fromidx, 1) + 1;
+	      newfromidx = atomic_fetch_and_acquire (&fromidx, 1) + 1;

I don't see how that could possibly work...

Btw is this trying to split my catomic patch into baby steps? Given these
are simple counters (not locks), you only need atomicity, so relaxed MO
is the obvious equivalent.

Cheers,
Wilco


More information about the Libc-alpha mailing list