blob: 545511e7831c36c11c9e7a9523f9df16fd550ad1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
/*
FUNCTION
<<__retarget_lock_init>>, <<__retarget_lock_init_recursive>>, <<__retarget_lock_close>>, <<__retarget_lock_close_recursive>>, <<__retarget_lock_acquire>>, <<__retarget_lock_acquire_recursive>>, <<__retarget_lock_try_acquire>>, <<__retarget_lock_try_acquire_recursive>>, <<__retarget_lock_release>>, <<__retarget_lock_release_recursive>>---locking routines
INDEX
__lock___sinit_recursive_mutex
INDEX
__lock___sfp_recursive_mutex
INDEX
__lock___atexit_recursive_mutex
INDEX
__lock___at_quick_exit_mutex
INDEX
__lock___malloc_recursive_mutex
INDEX
__lock___env_recursive_mutex
INDEX
__lock___tz_mutex
INDEX
__lock___dd_hash_mutex
INDEX
__lock___arc4random_mutex
INDEX
__retarget_lock_init
INDEX
__retarget_lock_init_recursive
INDEX
__retarget_lock_close
INDEX
__retarget_lock_close_recursive
INDEX
__retarget_lock_acquire
INDEX
__retarget_lock_acquire_recursive
INDEX
__retarget_lock_try_acquire
INDEX
__retarget_lock_try_acquire_recursive
INDEX
__retarget_lock_release
INDEX
__retarget_lock_release_recursive
SYNOPSIS
#include <lock.h>
struct __lock __lock___sinit_recursive_mutex;
struct __lock __lock___sfp_recursive_mutex;
struct __lock __lock___atexit_recursive_mutex;
struct __lock __lock___at_quick_exit_mutex;
struct __lock __lock___malloc_recursive_mutex;
struct __lock __lock___env_recursive_mutex;
struct __lock __lock___tz_mutex;
struct __lock __lock___dd_hash_mutex;
struct __lock __lock___arc4random_mutex;
void __retarget_lock_init (_LOCK_T * <[lock_ptr]>);
void __retarget_lock_init_recursive (_LOCK_T * <[lock_ptr]>);
void __retarget_lock_close (_LOCK_T <[lock]>);
void __retarget_lock_close_recursive (_LOCK_T <[lock]>);
void __retarget_lock_acquire (_LOCK_T <[lock]>);
void __retarget_lock_acquire_recursive (_LOCK_T <[lock]>);
int __retarget_lock_try_acquire (_LOCK_T <[lock]>);
int __retarget_lock_try_acquire_recursive (_LOCK_T <[lock]>);
void __retarget_lock_release (_LOCK_T <[lock]>);
void __retarget_lock_release_recursive (_LOCK_T <[lock]>);
DESCRIPTION
Newlib was configured to allow the target platform to provide the locking
routines and static locks at link time. As such, a dummy default
implementation of these routines and static locks is provided for
single-threaded application to link successfully out of the box on bare-metal
systems.
For multi-threaded applications the target platform is required to provide
an implementation for @strong{all} these routines and static locks. If some
routines or static locks are missing, the link will fail with doubly defined
symbols.
PORTABILITY
These locking routines and static lock are newlib-specific. Supporting OS
subroutines are required for linking multi-threaded applications.
*/
/* dummy lock routines and static locks for single-threaded apps */
#ifndef __SINGLE_THREAD__
#include <sys/lock.h>
struct __lock {
char unused;
};
struct __lock __lock___sinit_recursive_mutex;
struct __lock __lock___sfp_recursive_mutex;
struct __lock __lock___atexit_recursive_mutex;
struct __lock __lock___at_quick_exit_mutex;
struct __lock __lock___malloc_recursive_mutex;
struct __lock __lock___env_recursive_mutex;
struct __lock __lock___tz_mutex;
struct __lock __lock___dd_hash_mutex;
struct __lock __lock___arc4random_mutex;
void
__retarget_lock_init (_LOCK_T *lock)
{
}
void
__retarget_lock_init_recursive(_LOCK_T *lock)
{
}
void
__retarget_lock_close(_LOCK_T lock)
{
}
void
__retarget_lock_close_recursive(_LOCK_T lock)
{
}
void
__retarget_lock_acquire (_LOCK_T lock)
{
}
void
__retarget_lock_acquire_recursive (_LOCK_T lock)
{
}
int
__retarget_lock_try_acquire(_LOCK_T lock)
{
return 1;
}
int
__retarget_lock_try_acquire_recursive(_LOCK_T lock)
{
return 1;
}
void
__retarget_lock_release (_LOCK_T lock)
{
}
void
__retarget_lock_release_recursive (_LOCK_T lock)
{
}
#endif /* !defined(__SINGLE_THREAD__) */
|