From 108c4b085ccf88e9644fccbf5cec1b79c39e67e4 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 18 Feb 2011 15:12:44 +0000 Subject: 2011-02-18 Joel Sherrill * sapi/include/confdefs.h, score/Makefile.am, score/include/rtems/score/scheduler.h, score/include/rtems/score/schedulerpriority.h, score/include/rtems/score/thread.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/schedulerpriorityunblock.c, score/src/schedulerpriorityyield.c, score/src/threadchangepriority.c, score/src/threadclose.c, score/src/threadinitialize.c, score/src/threadsetpriority.c, score/src/threadsettransient.c: Significant clean up on Scheduler Plugin Interface. Names were shortened. Missing operations added. Many scheduler files had unneeded includes removed. Made pointer to scheduler information in Thread_Control and Scheduler_Control a void * pointer because the thread and scheduler wrapper should be unaware of scheduler types AND this is broken for user provided schedulers. * score/src/schedulerpriorityallocate.c, score/src/schedulerpriorityenqueue.c, score/src/schedulerpriorityenqueuefirst.c, score/src/schedulerpriorityextract.c, score/src/schedulerpriorityfree.c, score/src/schedulerpriorityupdate.c: New files. * score/src/schedulerprioritythreadschedulerallocate.c, score/src/schedulerprioritythreadschedulerfree.c, score/src/schedulerprioritythreadschedulerupdate.c: Removed. --- cpukit/score/src/schedulerpriorityyield.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'cpukit/score/src/schedulerpriorityyield.c') diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c index d25820993d..ba46a08f3d 100644 --- a/cpukit/score/src/schedulerpriorityyield.c +++ b/cpukit/score/src/schedulerpriorityyield.c @@ -1,7 +1,8 @@ /* - * Scheduler Handler + * Scheduler Priority Handler / Yield * * 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,19 +16,10 @@ #endif #include -#include -#include -#include #include -#include -#include #include -#include -#include +#include #include -#include -#include -#include /* * INTERRUPT LATENCY: @@ -37,12 +29,14 @@ void _Scheduler_priority_Yield(void) { - ISR_Level level; - Thread_Control *executing; - Chain_Control *ready; - - executing = _Thread_Executing; - ready = executing->scheduler.priority->ready_chain; + Scheduler_priority_Per_thread *sched_info; + ISR_Level level; + Thread_Control *executing; + Chain_Control *ready; + + executing = _Thread_Executing; + sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; + ready = sched_info->ready_chain; _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { _Chain_Extract_unprotected( &executing->Object.Node ); -- cgit v1.2.3