EN FR
EN FR


Section: New Software and Platforms

stdatomic and musl

We implement the libary side of the C11 atomic interface. It needs compiler support for the individual atomic operations and provides library supports for the cases where no low-level atomic instruction is available and a lock must be taken.

  • This implementation builds entirely on the ABIs of the gcc compiler for atomics.

  • It provide all function interfaces that the gcc ABIs and the C standard need.

  • For compilers that don't offer the direct language support for atomics it provides a syntactically reduced but fully functional approach to atomic operations.

  • At the core of the library is a new and very efficient futex-based lock algorithm that is implemented for the Linux operating system.

A description of the new lock algorithm has been given in [24] . A short version of it has been accepted for SAC'16.

The primary target of this library is an integration into musl to which we also contribute. It is a re-implementation of the C library as it is described by the C and POSIX standards. It is lightweight, fast, simple, free, and strives to be correct in the sense of standards-conformance and safety. Musl is production quality code that is mainly used in the area of embedded device. It gains more market share also in other area, e.g. there are now Linux distributions that are based on musl instead of Gnu LibC.