Helper function bpf_kptr_xchg
Definition
Copyright (c) 2015 The Libbpf Authors. All rights reserved.
Exchange kptr at pointer map_value with ptr, and return the old value. ptr can be NULL, otherwise it must be a referenced pointer which will be released when this helper is called.
Returns
The old value of kptr (which can be NULL). The returned pointer if not NULL, is a reference which must be released using its corresponding release function, or moved into a BPF map before program exit.
static void *(* const bpf_kptr_xchg)(void *map_value, void *ptr) = (void *) 194;
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Program types
This helper call can be used in the following program types:
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome