maybe i mis understand lightweight, but this looks enormous to me.
wrapping the atomic int in a platform independent interface with maximal inlining and compiler understanding of what it is, as an example, is what i imagined from this.
wrapping the atomic int in a platform independent interface with maximal inlining and compiler understanding of what it is, as an example, is what i imagined from this.
And, lighweight looks like it refers to the minimal amount of code in the library. Its a handful of fairly short files, enormous by no standards...
Besides, if you're writing C, C11 has the atomics support you desire. Not to mention that most programmers should stick to higher level abstractions than atomics (like mutexes).