On Tue, Sep 02, 2014 at 09:25:36PM +0900, KIYOHARA Takashi wrote: > Have you better idea? Directly map it to the GCC sync ops. The compiler either creates the instructions if supported, otherwise it falls back to libc's version. Joerg