Add atomic writing operations to C API.