xref: /linux/tools/testing/selftests/bpf/urandom_read_lib1.c (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */
3 #define _SDT_HAS_SEMAPHORES 1
4 #include "sdt.h"
5 
6 #define SEC(name) __attribute__((section(name), used))
7 
8 unsigned short urandlib_read_with_sema_semaphore SEC(".probes");
9 
10 void urandlib_read_with_sema(int iter_num, int iter_cnt, int read_sz)
11 {
12 	STAP_PROBE3(urandlib, read_with_sema, iter_num, iter_cnt, read_sz);
13 }
14