hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/tools/perf/examples/bpf/5sec.c
....@@ -39,11 +39,13 @@
3939 Copyright (C) 2018 Red Hat, Inc., Arnaldo Carvalho de Melo <acme@redhat.com>
4040 */
4141
42
-#include <bpf.h>
42
+#include <bpf/bpf.h>
4343
44
-int probe(hrtimer_nanosleep, rqtp->tv_sec)(void *ctx, int err, long sec)
44
+#define NSEC_PER_SEC 1000000000L
45
+
46
+int probe(hrtimer_nanosleep, rqtp)(void *ctx, int err, long long sec)
4547 {
46
- return sec == 5;
48
+ return sec / NSEC_PER_SEC == 5ULL;
4749 }
4850
4951 license(GPL);