Function glow::gl46::load_dyn_name_atomic_ptr

source ·
fn load_dyn_name_atomic_ptr(
    get_proc_address: &mut dyn FnMut(*const c_char) -> *mut c_void,
    fn_name: &[u8],
    ptr: &AtomicPtr<c_void>,
) -> bool
Expand description

Loads a function pointer. Rejects suggested pointer addresses which are likely to be lies. This function is used by both the global loader and struct loader. We mark it as inline(never) to favor a small binary over initialization speed. Returns if there’s now a non-null value in the atomic pointer.