File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -179,11 +179,15 @@ int32_t Thread::signal_clr(int32_t signals) {
179
179
Thread::State Thread::get_state () {
180
180
#if !defined(__MBED_CMSIS_RTOS_CA9) && !defined(__MBED_CMSIS_RTOS_CM)
181
181
#ifdef CMSIS_OS_RTX
182
- State status = Deleted ;
182
+ State status;
183
183
_mutex.lock ();
184
184
185
185
if (_tid != NULL ) {
186
186
status = (State)_thread_def.tcb .state ;
187
+ } else if (_finished) {
188
+ status = Deleted;
189
+ } else {
190
+ status = Inactive;
187
191
}
188
192
189
193
_mutex.unlock ();
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ class Thread {
252
252
253
253
/* * State of the Thread */
254
254
enum State {
255
- Inactive, /* *< Not created or terminated */
255
+ Inactive, /* *< Not created */
256
256
Ready, /* *< Ready to run */
257
257
Running, /* *< Running */
258
258
WaitingDelay, /* *< Waiting for a delay to occur */
You can’t perform that action at this time.
0 commit comments