summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-02-17 22:21:44 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-02-17 22:21:44 +0000
commit010192dd9fcfe40b82ca7595a732ed3ffbe9fdc1 (patch)
tree0bf11736eba94f9f997f0aaa7a59d97d3cb4470f /cpukit/score/src
parent2011-02-17 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-010192dd9fcfe40b82ca7595a732ed3ffbe9fdc1.tar.bz2
2011-02-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* sapi/include/confdefs.h, sapi/include/rtems/config.h, score/include/rtems/score/scheduler.h, score/include/rtems/score/schedulerpriority.h, score/inline/rtems/score/scheduler.inl, score/inline/rtems/score/schedulerpriority.inl, score/src/scheduler.c, score/src/schedulerpriority.c, score/src/schedulerpriorityblock.c, score/src/schedulerpriorityschedule.c, score/src/schedulerprioritythreadschedulerallocate.c, score/src/schedulerprioritythreadschedulerfree.c, score/src/schedulerprioritythreadschedulerupdate.c, score/src/schedulerpriorityunblock.c, score/src/schedulerpriorityyield.c, score/src/threadchangepriority.c, score/src/threadclearstate.c, score/src/threadclose.c, score/src/threadinitialize.c, score/src/threadready.c, score/src/threadresume.c, score/src/threadsetpriority.c, score/src/threadsetstate.c, score/src/threadsuspend.c: Simplify the pluggable scheduler interface. Its configuration made a table of available schedulers and set a pointer to one of the. This was heavy handed since you can only use one scheduler in an application. This configuration mechanism resulted in a scheduler pointer being passed around when you could put all scheduler configuration in an initialized structure.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/scheduler.c14
-rw-r--r--cpukit/score/src/schedulerpriority.c35
-rw-r--r--cpukit/score/src/schedulerpriorityblock.c19
-rw-r--r--cpukit/score/src/schedulerpriorityschedule.c29
-rw-r--r--cpukit/score/src/schedulerprioritythreadschedulerallocate.c24
-rw-r--r--cpukit/score/src/schedulerprioritythreadschedulerfree.c16
-rw-r--r--cpukit/score/src/schedulerprioritythreadschedulerupdate.c25
-rw-r--r--cpukit/score/src/schedulerpriorityunblock.c34
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c18
-rw-r--r--cpukit/score/src/threadchangepriority.c30
-rw-r--r--cpukit/score/src/threadclearstate.c24
-rw-r--r--cpukit/score/src/threadclose.c17
-rw-r--r--cpukit/score/src/threadinitialize.c7
-rw-r--r--cpukit/score/src/threadready.c24
-rw-r--r--cpukit/score/src/threadresume.c24
-rw-r--r--cpukit/score/src/threadsetpriority.c21
-rw-r--r--cpukit/score/src/threadsetstate.c22
-rw-r--r--cpukit/score/src/threadsuspend.c21
18 files changed, 56 insertions, 348 deletions
diff --git a/cpukit/score/src/scheduler.c b/cpukit/score/src/scheduler.c
index 9d7424eef6..60d8bc7fe7 100644
--- a/cpukit/score/src/scheduler.c
+++ b/cpukit/score/src/scheduler.c
@@ -2,6 +2,7 @@
* Scheduler Handler
*
* Copyright (C) 2010 Gedare Bloom.
+ * Copyright (C) 2011 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
@@ -27,19 +28,14 @@
/*
* _Scheduler_Handler_initialization
*
- * This routine initializes the scheduler by calling the scheduler_init
- * function registered in the Configuration Scheduler Table.
+ * This routine initializes the scheduler by calling the scheduler
+ * initialize function registered in the Configuration Scheduler Table.
*
* Input parameters: NONE
*
* Output parameters: NONE
*/
-
-void _Scheduler_Handler_initialization( )
+void _Scheduler_Handler_initialization(void)
{
- Scheduler_Control *the_scheduler = &_Scheduler;
-
- (*(_Scheduler_Table[Configuration.scheduler_policy].scheduler_init))(
- the_scheduler
- );
+ (*_Scheduler.Operations.initialize)();
}
diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c
index aa7ecee72e..93586a8a7b 100644
--- a/cpukit/score/src/schedulerpriority.c
+++ b/cpukit/score/src/schedulerpriority.c
@@ -2,6 +2,7 @@
* Scheduler Handler
*
* Copyright (C) 2010 Gedare Bloom.
+ * Copyright (C) 2011 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
@@ -29,38 +30,8 @@ volatile Priority_bit_map_Control _Priority_Major_bit_map;
Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
-/*
- * _Scheduler_priority_Initialize
- *
- * Initializes the scheduler for priority scheduling.
- *
- * Input parameters:
- * the_scheduler - pointer to scheduler control
- *
- * Output parameters: NONE
- */
-
-void _Scheduler_priority_Initialize (
- Scheduler_Control *the_scheduler
-)
+void _Scheduler_priority_Initialize(void)
{
- /* the operations table is a jump table to redirect generic scheduler
- * function calls to scheduler implementation specific functions. The
- * main purpose of scheduler initialization is to set up the jump table
- * for the scheduler. Every scheduler implementation provides its own
- * scheduler operations table.
- */
- the_scheduler->Operations.schedule = &_Scheduler_priority_Schedule;
- the_scheduler->Operations.yield = &_Scheduler_priority_Yield;
- the_scheduler->Operations.block = &_Scheduler_priority_Block;
- the_scheduler->Operations.unblock = &_Scheduler_priority_Unblock;
- the_scheduler->Operations.scheduler_allocate =
- &_Scheduler_priority_Thread_scheduler_allocate;
- the_scheduler->Operations.scheduler_free =
- &_Scheduler_priority_Thread_scheduler_free;
- the_scheduler->Operations.scheduler_update =
- &_Scheduler_priority_Thread_scheduler_update;
-
- _Scheduler_priority_Ready_queue_initialize( the_scheduler );
+ _Scheduler_priority_Ready_queue_initialize();
_Priority_bit_map_Handler_initialization( );
}
diff --git a/cpukit/score/src/schedulerpriorityblock.c b/cpukit/score/src/schedulerpriorityblock.c
index 984c9b96c9..3babe6e0cc 100644
--- a/cpukit/score/src/schedulerpriorityblock.c
+++ b/cpukit/score/src/schedulerpriorityblock.c
@@ -2,6 +2,7 @@
* Scheduler Handler
*
* Copyright (C) 2010 Gedare Bloom.
+ * Copyright (C) 2011 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
@@ -24,25 +25,9 @@
#include <rtems/score/schedulerpriority.h>
#include <rtems/score/thread.h>
-/*
- * _Scheduler_priority_Block
- *
- * This kernel routine removes the_thread from scheduling decisions based
- * on simple queue extraction.
- *
- * Input parameters:
- * the_scheduler - pointer to scheduler control
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- */
-
void _Scheduler_priority_Block(
- Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
- _Scheduler_priority_Block_body(the_scheduler, the_thread);
+ _Scheduler_priority_Block_body(the_thread);
}
diff --git a/cpukit/score/src/schedulerpriorityschedule.c b/cpukit/score/src/schedulerpriorityschedule.c
index 44395949c6..052de7156a 100644
--- a/cpukit/score/src/schedulerpriorityschedule.c
+++ b/cpukit/score/src/schedulerpriorityschedule.c
@@ -2,6 +2,7 @@
* Scheduler Handler
*
* Copyright (C) 2010 Gedare Bloom.
+ * Copyright (C) 2011 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
@@ -15,34 +16,10 @@
#endif
#include <rtems/system.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/percpu.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/thread.h>
-/*
- * _Scheduler_priority_Schedule
- *
- * This kernel routine implements scheduling decision logic for priority-based
- * scheduling.
- *
- * Input parameters:
- * the_scheduler - pointer to scheduler control
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- */
-
-void _Scheduler_priority_Schedule(
- Scheduler_Control *the_scheduler
-)
+void _Scheduler_priority_Schedule(void)
{
- _Scheduler_priority_Schedule_body( the_scheduler );
+ _Scheduler_priority_Schedule_body();
}
diff --git a/cpukit/score/src/schedulerprioritythreadschedulerallocate.c b/cpukit/score/src/schedulerprioritythreadschedulerallocate.c
index 8dedabea15..3cce3e866e 100644
--- a/cpukit/score/src/schedulerprioritythreadschedulerallocate.c
+++ b/cpukit/score/src/schedulerprioritythreadschedulerallocate.c
@@ -16,38 +16,20 @@
#include <rtems/system.h>
#include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
-/*
- * _Scheduler_priority_Thread_scheduler_allocate
- *
- * Allocates @a the_thread->scheduler
- *
- * Input parameters:
- * the_scheduler - pointer to scheduler control
- * the_thread - pointer to thread control block
- *
- * Output parameters:
- * Returns pointer to allocated space.
- */
-
-void* _Scheduler_priority_Thread_scheduler_allocate (
- Scheduler_Control *the_scheduler __attribute__((unused)),
+void *_Scheduler_priority_Thread_scheduler_allocate (
Thread_Control *the_thread
)
{
- void *sched;
+ void *sched;
sched = _Workspace_Allocate( sizeof(Scheduler_priority_Per_thread) );
- the_thread->scheduler.priority = (Scheduler_priority_Per_thread*) sched;
+ the_thread->scheduler.priority = (Scheduler_priority_Per_thread *) sched;
return sched;
}
diff --git a/cpukit/score/src/schedulerprioritythreadschedulerfree.c b/cpukit/score/src/schedulerprioritythreadschedulerfree.c
index b43ee963b1..5b13d20952 100644
--- a/cpukit/score/src/schedulerprioritythreadschedulerfree.c
+++ b/cpukit/score/src/schedulerprioritythreadschedulerfree.c
@@ -2,6 +2,7 @@
* Scheduler Handler
*
* Copyright (C) 2010 Gedare Bloom.
+ * Copyright (C) 2011 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
@@ -25,21 +26,8 @@
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
-/*
- * _Scheduler_priority_Thread_scheduler_free
- *
- * Frees @a the_thread->scheduler
- *
- * Input parameters:
- * the_scheduler - pointer to scheduler control
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- */
-
void _Scheduler_priority_Thread_scheduler_free (
- Scheduler_Control *the_scheduler __attribute__((unused)),
- Thread_Control *the_thread
+ Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler.priority );
diff --git a/cpukit/score/src/schedulerprioritythreadschedulerupdate.c b/cpukit/score/src/schedulerprioritythreadschedulerupdate.c
index 16878111ab..4b75d1d084 100644
--- a/cpukit/score/src/schedulerprioritythreadschedulerupdate.c
+++ b/cpukit/score/src/schedulerprioritythreadschedulerupdate.c
@@ -2,6 +2,7 @@
* Scheduler Handler
*
* Copyright (C) 2010 Gedare Bloom.
+ * Copyright (C) 2011 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
@@ -16,34 +17,18 @@
#include <rtems/system.h>
#include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
#include <rtems/score/priority.h>
#include <rtems/score/prioritybitmap.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/states.h>
#include <rtems/score/thread.h>
-/*
- * _Scheduler_priority_Thread_scheduler_update
- *
- * Updates @a the_thread->scheduler
- *
- * Input parameters:
- * the_scheduler - pointer to scheduler control
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- */
-
-void _Scheduler_priority_Thread_scheduler_update (
- Scheduler_Control *the_scheduler,
- Thread_Control *the_thread
+void _Scheduler_priority_Thread_scheduler_update(
+ Thread_Control *the_thread
)
{
- Chain_Control *rq = the_scheduler->Ready_queues.priority;
+ Chain_Control *rq = _Scheduler.Ready_queues.priority;
+
the_thread->scheduler.priority->ready_chain = &rq[
the_thread->current_priority
];
diff --git a/cpukit/score/src/schedulerpriorityunblock.c b/cpukit/score/src/schedulerpriorityunblock.c
index 798a614bb9..c0ca1924d2 100644
--- a/cpukit/score/src/schedulerpriorityunblock.c
+++ b/cpukit/score/src/schedulerpriorityunblock.c
@@ -2,6 +2,7 @@
* Scheduler Handler
*
* Copyright (C) 2010 Gedare Bloom.
+ * Copyright (C) 2011 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
@@ -15,43 +16,12 @@
#endif
#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * _Scheduler_priority_Unblock
- *
- * This kernel routine readies the requested thread according to the queuing
- * discipline. A new heir thread may be selected.
- *
- * Input parameters:
- * the_scheduler - pointer to scheduler control
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- *
- * NOTE: This routine uses the "blocking" heir selection mechanism.
- * This ensures the correct heir after a thread restart.
- *
- * INTERRUPT LATENCY:
- */
void _Scheduler_priority_Unblock (
- Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
- _Scheduler_priority_Unblock_body(the_scheduler, the_thread);
+ _Scheduler_priority_Unblock_body(the_thread);
}
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index 0383e41833..d25820993d 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -30,28 +30,12 @@
#include <rtems/score/wkspace.h>
/*
- * _Scheduler_priority_Yield
- *
- * This kernel routine will remove the running THREAD from the ready queue
- * and place it immediately at the rear of this chain. Reset timeslice
- * and yield the processor functions both use this routine, therefore if
- * reset is true and this is the only thread on the queue then the
- * timeslice counter is reset. The heir THREAD will be updated if the
- * running is also the currently the heir.
- *
- * Input parameters:
- * the_scheduler - pointer to scheduler control
- *
- * Output parameters: NONE
- *
* INTERRUPT LATENCY:
* ready chain
* select heir
*/
-void _Scheduler_priority_Yield(
- Scheduler_Control *the_scheduler __attribute__((unused))
-)
+void _Scheduler_priority_Yield(void)
{
ISR_Level level;
Thread_Control *executing;
diff --git a/cpukit/score/src/threadchangepriority.c b/cpukit/score/src/threadchangepriority.c
index bad36b92d7..313d1697e8 100644
--- a/cpukit/score/src/threadchangepriority.c
+++ b/cpukit/score/src/threadchangepriority.c
@@ -17,39 +17,11 @@
#endif
#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Change_priority
- *
- * This kernel routine changes the priority of the thread. The
- * thread chain is adjusted if necessary.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- * new_priority - ultimate priority
- * prepend_it - true if the thread should be prepended to the chain
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select heir
- */
void _Thread_Change_priority(
Thread_Control *the_thread,
@@ -137,7 +109,7 @@ void _Thread_Change_priority(
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
- _Scheduler_Schedule(&_Scheduler);
+ _Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
diff --git a/cpukit/score/src/threadclearstate.c b/cpukit/score/src/threadclearstate.c
index 87f959024f..afeab04e8e 100644
--- a/cpukit/score/src/threadclearstate.c
+++ b/cpukit/score/src/threadclearstate.c
@@ -1,8 +1,7 @@
/*
- * Thread Handler
+ * Thread Handler / Thread Clear State
*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,26 +30,11 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
-/*PAGE
- *
- * _Thread_Clear_state
- *
- * This kernel routine clears the appropriate states in the
- * requested thread. The thread ready chain is adjusted if
- * necessary and the Heir thread is set accordingly.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- * state - state set to clear
- *
- * Output parameters: NONE
- *
+/*
* INTERRUPT LATENCY:
* priority map
* select heir
*/
-
-
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
@@ -67,7 +51,7 @@ void _Thread_Clear_state(
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
- _Scheduler_Unblock( &_Scheduler, the_thread);
+ _Scheduler_Unblock( the_thread );
}
}
_ISR_Enable( level );
diff --git a/cpukit/score/src/threadclose.c b/cpukit/score/src/threadclose.c
index 2ba29519d9..853451aab1 100644
--- a/cpukit/score/src/threadclose.c
+++ b/cpukit/score/src/threadclose.c
@@ -1,8 +1,7 @@
/*
- * Thread Handler
+ * Thread Handler / Thread Close
*
- *
- * COPYRIGHT (c) 1989-2008.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,16 +30,6 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
-/*
- * _Thread_Close
- *
- * DESCRIPTION:
- *
- * This routine frees all memory associated with the specified
- * thread and removes it from the local object table so no further
- * operations on this thread are allowed.
- */
-
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
@@ -89,7 +78,7 @@ void _Thread_Close(
/*
* Free the per-thread scheduling information.
*/
- _Scheduler_Thread_scheduler_free( &_Scheduler, the_thread );
+ _Scheduler_Thread_scheduler_free( the_thread );
/*
* The thread might have been FP. So deal with that.
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index df20017af4..cda596bc56 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -1,8 +1,7 @@
/*
- * Thread Handler
+ * Thread Handler / Thread Initialize
*
- *
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -194,7 +193,7 @@ bool _Thread_Initialize(
the_thread->resource_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
- sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
+ sched =_Scheduler_Thread_scheduler_allocate( the_thread );
if ( !sched )
goto failed;
_Thread_Set_priority( the_thread, priority );
diff --git a/cpukit/score/src/threadready.c b/cpukit/score/src/threadready.c
index aa81a05582..9e3a285d22 100644
--- a/cpukit/score/src/threadready.c
+++ b/cpukit/score/src/threadready.c
@@ -1,8 +1,7 @@
/*
- * Thread Handler
+ * Thread Handler / Thread Ready
*
- *
- * COPYRIGHT (c) 1989-2006.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,26 +30,11 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
-/*PAGE
- *
- * _Thread_Ready
- *
- * This kernel routine readies the requested thread, the thread chain
- * is adjusted. A new heir thread may be selected.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- *
- * NOTE: This routine uses the "blocking" heir selection mechanism.
- * This ensures the correct heir after a thread restart.
- *
+/*
* INTERRUPT LATENCY:
* ready chain
* select heir
*/
-
void _Thread_Ready(
Thread_Control *the_thread
)
@@ -61,7 +45,7 @@ void _Thread_Ready(
the_thread->current_state = STATES_READY;
- _Scheduler_Unblock( &_Scheduler, the_thread );
+ _Scheduler_Unblock( the_thread );
_ISR_Enable( level );
}
diff --git a/cpukit/score/src/threadresume.c b/cpukit/score/src/threadresume.c
index faed53d185..a3a4f03ee9 100644
--- a/cpukit/score/src/threadresume.c
+++ b/cpukit/score/src/threadresume.c
@@ -1,8 +1,8 @@
/*
- * Thread Handler
+ * Thread Handler / Thread Resume
*
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,27 +31,11 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
-/*PAGE
- *
- * _Thread_Resume
- *
- * This kernel routine clears the SUSPEND state if the suspend_count
- * drops below one. If the force parameter is set the suspend_count
- * is forced back to zero. The thread ready chain is adjusted if
- * necessary and the Heir thread is set accordingly.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- * force - force the suspend count back to 0
- *
- * Output parameters: NONE
- *
+/*
* INTERRUPT LATENCY:
* priority map
* select heir
*/
-
-
void _Thread_Resume(
Thread_Control *the_thread,
bool force
@@ -69,7 +53,7 @@ void _Thread_Resume(
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
- _Scheduler_Unblock( &_Scheduler, the_thread );
+ _Scheduler_Unblock( the_thread );
}
}
diff --git a/cpukit/score/src/threadsetpriority.c b/cpukit/score/src/threadsetpriority.c
index fa4676fdb5..5c43c376a5 100644
--- a/cpukit/score/src/threadsetpriority.c
+++ b/cpukit/score/src/threadsetpriority.c
@@ -1,8 +1,7 @@
/*
- * Thread Handler
+ * Thread Handler / Thread Set Priority
*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,20 +30,6 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
-/*PAGE
- *
- * _Thread_Set_priority
- *
- * This directive enables and disables several modes of
- * execution for the requesting thread.
- *
- * Input parameters:
- * the_thread - pointer to thread priority
- * new_priority - new priority
- *
- * Output: NONE
- */
-
void _Thread_Set_priority(
Thread_Control *the_thread,
Priority_Control new_priority
@@ -52,5 +37,5 @@ void _Thread_Set_priority(
{
the_thread->current_priority = new_priority;
- _Scheduler_Thread_scheduler_update(&_Scheduler, the_thread);
+ _Scheduler_Thread_scheduler_update( the_thread );
}
diff --git a/cpukit/score/src/threadsetstate.c b/cpukit/score/src/threadsetstate.c
index 89366f8c7d..1dcf33344c 100644
--- a/cpukit/score/src/threadsetstate.c
+++ b/cpukit/score/src/threadsetstate.c
@@ -1,8 +1,7 @@
/*
- * Thread Handler
+ * Thread Handler / Thread Set State
*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,24 +30,11 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
-/*PAGE
- *
- * _Thread_Set_state
- *
- * This kernel routine sets the requested state in the THREAD. The
- * THREAD chain is adjusted if necessary.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- * state - state to be set
- *
- * Output parameters: NONE
- *
+/*
* INTERRUPT LATENCY:
* ready chain
* select map
*/
-
void _Thread_Set_state(
Thread_Control *the_thread,
States_Control state
@@ -66,7 +52,7 @@ void _Thread_Set_state(
the_thread->current_state = state;
- _Scheduler_Block( &_Scheduler, the_thread);
+ _Scheduler_Block( the_thread );
_ISR_Enable( level );
}
diff --git a/cpukit/score/src/threadsuspend.c b/cpukit/score/src/threadsuspend.c
index 69e5d9a277..f5169a25f2 100644
--- a/cpukit/score/src/threadsuspend.c
+++ b/cpukit/score/src/threadsuspend.c
@@ -1,8 +1,8 @@
/*
- * Thread Handler
+ * Thread Handler / Thread Suspend
*
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,23 +31,10 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
-/*PAGE
- *
- * _Thread_Suspend
- *
- * This kernel routine sets the SUSPEND state in the THREAD. The
- * THREAD chain and suspend count are adjusted if necessary.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
+/* INTERRUPT LATENCY:
* ready chain
* select map
*/
-
void _Thread_Suspend(
Thread_Control *the_thread
)
@@ -64,7 +51,7 @@ void _Thread_Suspend(
the_thread->current_state = STATES_SUSPENDED;
- _Scheduler_Block(&_Scheduler, the_thread);
+ _Scheduler_Block( the_thread );
_ISR_Enable( level );
}