Yingchi Long c6486633d2
[BPF] report Invalid usage of the XADD return value" elegantly (#92742)
Previously `report_fatal_error` is used for reporting something goes
wrong in the backend, but this is confusing because `report_fatal_error`
basically means there are something unexpected & crashed in the backend.

So, turn this "crash" into an elegant error reporting. After this patch,
clang can diagnose it:

    bpf-crash.c:4:30: error: Invalid usage of the XADD return value
4 | u32 next_event_id() { return __sync_fetch_and_add(&GLOBAL_EVENT_ID,
1); }
        |                              ^
    1 error generated.
2024-05-21 01:57:56 +08:00
..
2024-03-13 02:27:25 +02:00
2024-03-23 13:06:58 +08:00