Commit bcd376a
committed
opal/mca/threads/pthreads: remove opal_pthread_mutex_t
opal_pthread_mutex_t is not used. This patch removes it.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads/qthreads,argobots: remove m_recursive
m_recursive is not used. This patch removes it.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads/qthreads,argobots: update wait_sync implementation
This patch is corresponding to changes to the following commit for
Pthreads: 6a406fb
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads/pthreads: implement opal_thread_internal_mutex/cond_t
opal_thread_internal_mutex_t and opal_thread_internal_cond_t are new
objects that are directly mapped to raw mutex/condition variable
implementations (e.g., pthread_mutex_t for Pthreads). This abstraction
is different from opal_mutex_t, which has more functionalities.
Introducing this abstraction helps removal of code duplication among
other threading layers.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads/pthreads: use opal_thread_internal_mutex/cond_t
opal_thread_internal_mutex/cond routines are static inline functions, so
there should be no additional overhead.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads/argobots: implement opal_thread_internal_mutex/cond_t
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads/argobots: use opal_thread_internal_mutex/cond_t
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads/qthreads: implement opal_thread_internal_mutex/cond_t
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads/qthreads: use opal_thread_internal_mutex/cond_t
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads: move mutex implementation to threads/base
Now implementations of opal_mutex_xxx() and opal_cond_xxx() are the
same. This patch moves them to base/mutex.c and mutex.h and removes the
duplication.
Note that those implementations are copied from
pthread/threads_pthreads_mutex.c and pthread/threads_pthreads_mutex.h.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads: use opal_thread_yield() in busy loop if requested
This commit is prerequisite for the next commit that unifies the
implementation of wait_sync. Nonpreemptive threads like Qthreads and
Argobots need a yield in a busy loop to avoid a deadlock, while Pthreads
does not.
To unify the implementation in the next commit, this patch adds
opal_thread_yield() if opal_progress_yield_when_idle is true.
At the same time, this patch removes a yield operation after
opal_progress() since opal_progress() internally yields when it does not
make any progress.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads: move wait_sync implementation to threads/base
Now implementations of wait_sync_xxx() functions and macros are the
same. This patch moves them to base/wait_sync.c and wait_sync.h and
removes the duplication.
Note that those implementations are copied from
pthread/threads_pthreads_wait_sync.c and
pthread/threads_pthreads_wait_sync.h.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads: change Pthread-specific names
This patch renames variables and functions that are no longer specific
to Pthread.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads: remove MCA_threads_wait_sync_base_include_xxx
MCA_threads_wait_sync_base_include_xxx is no longer used. This patch
removes them.
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
opal/mca/threads: minor cleanup
- Remove unnecessary "include"
- Remove weird empty lines
- Clean up parentheses for macros
- Remove EDEADLK check for trylock() and unlock()
Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>1 parent 02c5abf commit bcd376a
File tree
21 files changed
+516
-1301
lines changed- opal/mca/threads
- argobots
- base
- pthreads
- qthreads
21 files changed
+516
-1301
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | 126 | | |
130 | 127 | | |
131 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | | - | |
49 | | - | |
| 47 | + | |
| 48 | + | |
50 | 49 | | |
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 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
77 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
78 | 66 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
86 | 71 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 72 | + | |
93 | 73 | | |
| 74 | + | |
94 | 75 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 76 | + | |
102 | 77 | | |
103 | | - | |
| 78 | + | |
104 | 79 | | |
105 | 80 | | |
106 | 81 | | |
107 | 82 | | |
108 | 83 | | |
109 | | - | |
| 84 | + | |
110 | 85 | | |
111 | 86 | | |
| 87 | + | |
| 88 | + | |
112 | 89 | | |
113 | | - | |
114 | 90 | | |
115 | 91 | | |
116 | | - | |
| 92 | + | |
117 | 93 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 94 | + | |
132 | 95 | | |
133 | 96 | | |
134 | 97 | | |
135 | | - | |
| 98 | + | |
136 | 99 | | |
137 | 100 | | |
138 | 101 | | |
| |||
141 | 104 | | |
142 | 105 | | |
143 | 106 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
149 | 111 | | |
150 | | - | |
| 112 | + | |
151 | 113 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 114 | + | |
155 | 115 | | |
156 | | - | |
| 116 | + | |
157 | 117 | | |
158 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
159 | 121 | | |
160 | 122 | | |
161 | | - | |
| 123 | + | |
| 124 | + | |
162 | 125 | | |
163 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
164 | 134 | | |
165 | 135 | | |
166 | | - | |
| 136 | + | |
167 | 137 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
171 | 142 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 143 | + | |
| 144 | + | |
180 | 145 | | |
181 | 146 | | |
182 | | - | |
| 147 | + | |
183 | 148 | | |
184 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
185 | 156 | | |
186 | 157 | | |
187 | | - | |
| 158 | + | |
188 | 159 | | |
189 | | - | |
| 160 | + | |
190 | 161 | | |
191 | 162 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | 163 | | |
204 | 164 | | |
205 | 165 | | |
0 commit comments