source: mainline/uspace/lib/dltest/dltest.c@ c8ea6eca

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since c8ea6eca was 4122410, checked in by Jakub Jermar <jakub@…>, 7 years ago

Improve Doxygen documentaion

This is stil WiP. A number of libraries, drivers and services were
converted to using a more hierarchical and decentralized scheme when it
comes to specifying to which doxygen group they belong.

  • Property mode set to 100644
File size: 4.2 KB
Line 
1/*
2 * Copyright (c) 2016 Jiri Svoboda
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup libdltest
30 * @{
31 */
32/** @file
33 */
34
35#include <fibril.h>
36#include "libdltest.h"
37
38/** Private initialized variable */
39static int private_var = dl_private_var_val;
40/** Private uninitialized variable */
41static int private_uvar;
42
43/** Public initialized variable */
44int dl_public_var = dl_public_var_val;
45/** Public uninitialized variable */
46int dl_public_uvar;
47
48/** Private initialized fibril-local variable */
49static fibril_local int dl_private_fib_var = dl_private_fib_var_val;
50/** Private uninitialized fibril-local variable */
51static fibril_local int dl_private_fib_uvar;
52
53/** Public initialized fibril-local variable */
54fibril_local int dl_public_fib_var = dl_public_fib_var_val;
55/** Public uninitialized fibril-local variable */
56fibril_local int dl_public_fib_uvar;
57
58/** Return constant value. */
59int dl_get_constant(void)
60{
61 return dl_constant;
62}
63
64/** Return value of private initialized variable */
65int dl_get_private_var(void)
66{
67 return private_var;
68}
69
70/** Return address of private initialized variable */
71int *dl_get_private_var_addr(void)
72{
73 return &private_var;
74}
75
76/** Return value of private uninitialized variable */
77int dl_get_private_uvar(void)
78{
79 return private_uvar;
80}
81
82/** Return vaddress of private uninitialized variable */
83int *dl_get_private_uvar_addr(void)
84{
85 return &private_uvar;
86}
87
88/** Return value of public initialized variable */
89int dl_get_public_var(void)
90{
91 return dl_public_var;
92}
93
94/** Return address of public initialized variable */
95int *dl_get_public_var_addr(void)
96{
97 return &dl_public_var;
98}
99
100/** Return value of public uninitialized variable */
101int dl_get_public_uvar(void)
102{
103 return dl_public_uvar;
104}
105
106/** Return address of public uninitialized variable */
107int *dl_get_public_uvar_addr(void)
108{
109 return &dl_public_uvar;
110}
111
112/** Return value of private initialized fibril-local variable */
113int dl_get_private_fib_var(void)
114{
115 return dl_private_fib_var;
116}
117
118/** Return address of private initialized fibril-local variable */
119int *dl_get_private_fib_var_addr(void)
120{
121 return &dl_private_fib_var;
122}
123
124/** Return value of private uninitialized fibril-local variable */
125int dl_get_private_fib_uvar(void)
126{
127 return dl_private_fib_uvar;
128}
129
130/** Return address of private uninitialized fibril-local variable */
131int *dl_get_private_fib_uvar_addr(void)
132{
133 return &dl_private_fib_uvar;
134}
135
136/** Return value of public initialized fibril-local variable */
137int dl_get_public_fib_var(void)
138{
139 return dl_public_fib_var;
140}
141
142/** Return value of public initialized fibril-local variable */
143int *dl_get_public_fib_var_addr(void)
144{
145 return &dl_public_fib_var;
146}
147
148/** Return value of public uninitialized fibril-local variable */
149int dl_get_public_fib_uvar(void)
150{
151 return dl_public_fib_uvar;
152}
153
154/** Return value of public uninitialized fibril-local variable */
155int *dl_get_public_fib_uvar_addr(void)
156{
157 return &dl_public_fib_uvar;
158}
159
160/**
161 * @}
162 */
Note: See TracBrowser for help on using the repository browser.