Lines Matching +full:timeout +full:- +full:sec
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2024-2025 Meta Platforms, Inc. and affiliates. */
20 } arrmap SEC(".maps");
22 struct bpf_res_spin_lock lockA __hidden SEC(".data.A");
23 struct bpf_res_spin_lock lockB __hidden SEC(".data.B");
25 SEC("tc")
33 return -1; in res_spin_lock_test()
36 return -1; in res_spin_lock_test()
38 r = bpf_res_spin_lock(&elem1->lock); in res_spin_lock_test()
41 r = bpf_res_spin_lock(&elem2->lock); in res_spin_lock_test()
43 bpf_res_spin_unlock(&elem2->lock); in res_spin_lock_test()
44 bpf_res_spin_unlock(&elem1->lock); in res_spin_lock_test()
45 return -1; in res_spin_lock_test()
47 bpf_res_spin_unlock(&elem1->lock); in res_spin_lock_test()
48 return r != -EDEADLK; in res_spin_lock_test()
51 SEC("tc")
68 SEC("tc")
79 err = -EDEADLK; in res_spin_lock_test_BA()
84 SEC("tc")
104 locks[i] = &e->lock; in res_spin_lock_test_held_lock_max()
108 int key = i - 2; in res_spin_lock_test_held_lock_max()
116 locks[i] = &e->lock; in res_spin_lock_test_held_lock_max()
126 * time, only the timeout can save us, as AA detection won't succeed. in res_spin_lock_test_held_lock_max()
135 ret = ret != -ETIMEDOUT ? 2 : 0; in res_spin_lock_test_held_lock_max()
138 for (i = i - 1; i >= 0; i--) in res_spin_lock_test_held_lock_max()
140 time = bpf_ktime_get_ns() - time_beg; in res_spin_lock_test_held_lock_max()
147 char _license[] SEC("license") = "GPL";