libbpf: Ensure print callback usage is thread-safe

This patch prevents races on the print function pointer, allowing the
libbpf_set_print() function to become thread-safe.

Signed-off-by: JP Kobryn <inwardvessel@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230325010845.46000-1-inwardvessel@gmail.com
This commit is contained in:
JP Kobryn 2023-03-24 18:08:45 -07:00 • committed by Andrii Nakryiko
commit f1cb927cdb
2 changed files with 8 additions and 3 deletions