unsafe extern "C" fn write_fence(cookie: *mut c_void, fence: u32)