diff options
Diffstat (limited to 'cpukit/rtems/src/tasksuspend.c')
-rw-r--r-- | cpukit/rtems/src/tasksuspend.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/rtems/src/tasksuspend.c b/cpukit/rtems/src/tasksuspend.c index f8c43a73f1..24f60fdc53 100644 --- a/cpukit/rtems/src/tasksuspend.c +++ b/cpukit/rtems/src/tasksuspend.c @@ -32,6 +32,12 @@ rtems_status_code rtems_task_suspend( switch ( location ) { case OBJECTS_LOCAL: +#if defined(RTEMS_SMP) + if ( _Thread_Is_life_terminating( the_thread->Life.state ) ) { + _Objects_Put( &the_thread->Object ); + _Assert_Not_reached(); + } +#endif if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); _Objects_Put( &the_thread->Object ); |