Skip to content

Add UncontendedMutex

Peter Limkilde Svendsen requested to merge plimkilde/relibc:l64a-mutex into master

I've been playing around with possible safer replacements for static mut, and would like to propose this new structure UncontendedMutex for many cases where static shared data is not thread-local and thread safety is not required by the spec. As a simple first use case, the static buffer used by l64a() has been wrapped in it.

Please note that I am not experienced with mutexes, atomics etc., so let me know if anything (including naming) needs adjustments.

Merge request reports