Hmm, the version of this that was pulled up into netbsd-9 has one serious error: atomic_c11_compare_exchange_cas_32.c uses atomic_cas_8 where it should use atomic_cas_32. I did not look at HEAD but I suppose it's got the same problem.
Good spot. [pullup-9 #1453] more lib/56832: Fwd: CVS commit: src/common/lib/libc/atomic Thanks, Nick