diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-18 16:11:03 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-31 08:29:43 +0200 |
commit | dcd5e2609b00f3b327cd175b28fae70a20572238 (patch) | |
tree | a3e5574d2c2a4a0122745a4afd64a34f5f7bb3d8 /cpukit/score/src/threadreset.c | |
parent | score: Use thread action for thread restart (diff) | |
download | rtems-dcd5e2609b00f3b327cd175b28fae70a20572238.tar.bz2 |
score: Move _Thread_Reset() and make static
Diffstat (limited to 'cpukit/score/src/threadreset.c')
-rw-r--r-- | cpukit/score/src/threadreset.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/cpukit/score/src/threadreset.c b/cpukit/score/src/threadreset.c deleted file mode 100644 index 6b566c3200..0000000000 --- a/cpukit/score/src/threadreset.c +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @file - * - * @brief Reset a Thread to its Initial State - * @ingroup ScoreThread - */ - -/* - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <rtems/score/threadimpl.h> -#include <rtems/score/threadqimpl.h> -#include <rtems/score/watchdogimpl.h> - -void _Thread_Reset( - Thread_Control *the_thread, - void *pointer_argument, - Thread_Entry_numeric_type numeric_argument -) -{ - the_thread->resource_count = 0; - the_thread->is_preemptible = the_thread->Start.is_preemptible; - the_thread->budget_algorithm = the_thread->Start.budget_algorithm; - the_thread->budget_callout = the_thread->Start.budget_callout; - - the_thread->Start.pointer_argument = pointer_argument; - the_thread->Start.numeric_argument = numeric_argument; - - if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { - - if ( _Watchdog_Is_active( &the_thread->Timer ) ) - (void) _Watchdog_Remove( &the_thread->Timer ); - } - - if ( the_thread->current_priority != the_thread->Start.initial_priority ) { - the_thread->real_priority = the_thread->Start.initial_priority; - _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); - } -} |