@@ -125,135 +125,6 @@ class Thread : private mbed::NonCopyable<Thread> {
125
125
}
126
126
127
127
128
- /* * Create a new thread, and start it executing the specified function.
129
- @param task function to be executed by this thread.
130
- @param priority initial priority of the thread function. (default: osPriorityNormal).
131
- @param stack_size stack size (in bytes) requirements for the thread function. (default: OS_STACK_SIZE).
132
- @param stack_mem pointer to the stack area to be used by this thread (default: nullptr).
133
- @deprecated
134
- Thread-spawning constructors hide errors. Replaced by thread.start(task).
135
-
136
- @code
137
- Thread thread(priority, stack_size, stack_mem);
138
-
139
- osStatus status = thread.start(task);
140
- if (status != osOK) {
141
- error("oh no!");
142
- }
143
- @endcode
144
-
145
- @note You cannot call this function from ISR context.
146
- */
147
- MBED_DEPRECATED_SINCE (" mbed-os-5.1" ,
148
- " Thread-spawning constructors hide errors. "
149
- " Replaced by thread.start(task)." )
150
- Thread (mbed::Callback<void ()> task,
151
- osPriority priority = osPriorityNormal,
152
- uint32_t stack_size = OS_STACK_SIZE,
153
- unsigned char *stack_mem = nullptr )
154
- {
155
- constructor (task, priority, stack_size, stack_mem);
156
- }
157
-
158
- /* * Create a new thread, and start it executing the specified function.
159
- @param argument pointer that is passed to the thread function as start argument. (default: nullptr).
160
- @param task argument to task.
161
- @param priority initial priority of the thread function. (default: osPriorityNormal).
162
- @param stack_size stack size (in bytes) requirements for the thread function. (default: OS_STACK_SIZE).
163
- @param stack_mem pointer to the stack area to be used by this thread (default: nullptr).
164
- @deprecated
165
- Thread-spawning constructors hide errors. Replaced by thread.start(callback(task, argument)).
166
-
167
- @code
168
- Thread thread(priority, stack_size, stack_mem);
169
-
170
- osStatus status = thread.start(callback(task, argument));
171
- if (status != osOK) {
172
- error("oh no!");
173
- }
174
- @endcode
175
-
176
- @note You cannot call this function from ISR context.
177
- */
178
- template <typename T>
179
- MBED_DEPRECATED_SINCE (" mbed-os-5.1" ,
180
- " Thread-spawning constructors hide errors. "
181
- " Replaced by thread.start(callback(task, argument))." )
182
- Thread (T *argument, void (T::*task)(),
183
- osPriority priority = osPriorityNormal,
184
- uint32_t stack_size = OS_STACK_SIZE,
185
- unsigned char *stack_mem = nullptr )
186
- {
187
- constructor (mbed::callback (task, argument),
188
- priority, stack_size, stack_mem);
189
- }
190
-
191
- /* * Create a new thread, and start it executing the specified function.
192
- @param argument pointer that is passed to the thread function as start argument. (default: nullptr).
193
- @param task argument to task.
194
- @param priority initial priority of the thread function. (default: osPriorityNormal).
195
- @param stack_size stack size (in bytes) requirements for the thread function. (default: OS_STACK_SIZE).
196
- @param stack_mem pointer to the stack area to be used by this thread (default: nullptr).
197
- @deprecated
198
- Thread-spawning constructors hide errors. Replaced by thread.start(callback(task, argument)).
199
-
200
- @code
201
- Thread thread(priority, stack_size, stack_mem);
202
-
203
- osStatus status = thread.start(callback(task, argument));
204
- if (status != osOK) {
205
- error("oh no!");
206
- }
207
- @endcode
208
-
209
- @note You cannot call this function from ISR context.
210
- */
211
- template <typename T>
212
- MBED_DEPRECATED_SINCE (" mbed-os-5.1" ,
213
- " Thread-spawning constructors hide errors. "
214
- " Replaced by thread.start(callback(task, argument))." )
215
- Thread (T *argument, void (*task)(T *),
216
- osPriority priority = osPriorityNormal,
217
- uint32_t stack_size = OS_STACK_SIZE,
218
- unsigned char *stack_mem = nullptr )
219
- {
220
- constructor (mbed::callback (task, argument),
221
- priority, stack_size, stack_mem);
222
- }
223
-
224
- /* * Create a new thread, and start it executing the specified function.
225
- Provided for backwards compatibility
226
- @param task function to be executed by this thread.
227
- @param argument pointer that is passed to the thread function as start argument. (default: nullptr).
228
- @param priority initial priority of the thread function. (default: osPriorityNormal).
229
- @param stack_size stack size (in bytes) requirements for the thread function. (default: OS_STACK_SIZE).
230
- @param stack_mem pointer to the stack area to be used by this thread (default: nullptr).
231
- @deprecated
232
- Thread-spawning constructors hide errors. Replaced by thread.start(callback(task, argument)).
233
-
234
- @code
235
- Thread thread(priority, stack_size, stack_mem);
236
-
237
- osStatus status = thread.start(callback(task, argument));
238
- if (status != osOK) {
239
- error("oh no!");
240
- }
241
- @endcode
242
-
243
- @note You cannot call this function from ISR context.
244
- */
245
- MBED_DEPRECATED_SINCE (" mbed-os-5.1" ,
246
- " Thread-spawning constructors hide errors. "
247
- " Replaced by thread.start(callback(task, argument))." )
248
- Thread (void (*task)(void const *argument), void *argument = nullptr ,
249
- osPriority priority = osPriorityNormal,
250
- uint32_t stack_size = OS_STACK_SIZE,
251
- unsigned char *stack_mem = nullptr )
252
- {
253
- constructor (mbed::callback ((void (*)(void *))task, argument),
254
- priority, stack_size, stack_mem);
255
- }
256
-
257
128
/* * Starts a thread executing the specified function.
258
129
@param task function to be executed by this thread.
259
130
@return status code that indicates the execution status of the function.
@@ -263,24 +134,6 @@ class Thread : private mbed::NonCopyable<Thread> {
263
134
*/
264
135
osStatus start (mbed::Callback<void ()> task);
265
136
266
- /* * Starts a thread executing the specified function.
267
- @param obj argument to task
268
- @param method function to be executed by this thread.
269
- @return status code that indicates the execution status of the function.
270
- @deprecated
271
- The start function does not support cv-qualifiers. Replaced by start(callback(obj, method)).
272
-
273
- @note You cannot call this function from ISR context.
274
- */
275
- template <typename T, typename M>
276
- MBED_DEPRECATED_SINCE (" mbed-os-5.1" ,
277
- " The start function does not support cv-qualifiers. "
278
- " Replaced by thread.start(callback(obj, method))." )
279
- osStatus start (T *obj, M method)
280
- {
281
- return start (mbed::callback (obj, method));
282
- }
283
-
284
137
/* * Wait for thread to terminate
285
138
@return status code that indicates the execution status of the function.
286
139
@@ -522,11 +375,6 @@ class Thread : private mbed::NonCopyable<Thread> {
522
375
uint32_t stack_size = OS_STACK_SIZE,
523
376
unsigned char *stack_mem = nullptr ,
524
377
const char *name = nullptr );
525
- void constructor (mbed::Callback<void ()> task,
526
- osPriority priority = osPriorityNormal,
527
- uint32_t stack_size = OS_STACK_SIZE,
528
- unsigned char *stack_mem = nullptr,
529
- const char *name = nullptr);
530
378
void constructor (uint32_t tz_module,
531
379
osPriority priority = osPriorityNormal,
532
380
uint32_t stack_size = OS_STACK_SIZE,
0 commit comments