EN FR
EN FR


Section: New Software and Platforms

stdatomic

standard atomic library

Keyword: Atomic access

Scientific Description: We present a new algorithm and implementation of a lock primitive that is based on Linux' native lock interface, the futex system call. It allows us to assemble compiler support for atomic data structures that can not be handled through specific hardware instructions. Such a tool is needed for C11's atomics interface because here an _Atomic qualification can be attached to almost any data type. Our lock data structure for that purpose meets very specific criteria concerning its field of operation and its performance. By that we are able to outperform gcc's libatomic library by around 60%.

Functional Description: This implementation builds entirely on the two gcc ABIs for atomics. It doesn't even attempt to go down to assembly level by itself. We provide all function interfaces that the two gcc ABIs and the C standard need. For compilers that don't offer the direct language support for atomics this provides a syntactically reduced but fully functional approach to atomic operations.