Skip to content

SCX eBPF macro bpf_refcount_acquire

v6.12

The bpf_refcount_acquire macro wraps bpf_refcount_acquire_impl to provide a more ergonomic interface.

Definition

#define bpf_refcount_acquire(kptr) bpf_refcount_acquire_impl(kptr, NULL)

Usage

The bpf_refcount_acquire_impl kfunc has a quirk where the second argument is always NULL, this wrapper abstracts that quirk away.

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome