xref: /freebsd/libexec/rtld-elf/tests/libval/libval.c (revision d9c543b6b0cabea6e6679d70b4e701018e7eab80)
1*d9c543b6SKyle Evans /*-
2*d9c543b6SKyle Evans  *
3*d9c543b6SKyle Evans  * Copyright (C) 2023 NetApp, Inc.
4*d9c543b6SKyle Evans  *
5*d9c543b6SKyle Evans  * SPDX-License-Identifier: BSD-2-Clause
6*d9c543b6SKyle Evans  *
7*d9c543b6SKyle Evans  */
8*d9c543b6SKyle Evans 
9*d9c543b6SKyle Evans static int val;
10*d9c543b6SKyle Evans 
11*d9c543b6SKyle Evans int get_value(void);
12*d9c543b6SKyle Evans void set_value(int);
13*d9c543b6SKyle Evans 
14*d9c543b6SKyle Evans int
get_value(void)15*d9c543b6SKyle Evans get_value(void)
16*d9c543b6SKyle Evans {
17*d9c543b6SKyle Evans 
18*d9c543b6SKyle Evans 	return (val);
19*d9c543b6SKyle Evans }
20*d9c543b6SKyle Evans 
21*d9c543b6SKyle Evans void
set_value(int nval)22*d9c543b6SKyle Evans set_value(int nval)
23*d9c543b6SKyle Evans {
24*d9c543b6SKyle Evans 
25*d9c543b6SKyle Evans 	val = nval;
26*d9c543b6SKyle Evans }
27