From 5c4e0c5947d7b9338842e2b58292678678e1144a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 25 Nov 2010 13:24:26 +0000 Subject: 2010-11-25 Sebastian Huber * sapi/include/confdefs.h, score/include/rtems/score/scheduler.h, score/inline/rtems/score/scheduler.inl, score/inline/rtems/score/schedulerpriority.inl, score/src/schedulerpriority.c, score/src/schedulerprioritythreadschedulerallocate.c, score/src/schedulerprioritythreadschedulerfree.c, score/src/schedulerprioritythreadschedulerupdate.c, score/src/schedulerpriorityyield.c: Added attribute unused. Renamed types and fields to follow the Score naming conventions. --- cpukit/ChangeLog | 12 ++++++++++++ cpukit/sapi/include/confdefs.h | 2 +- cpukit/score/include/rtems/score/scheduler.h | 17 ++++++++--------- cpukit/score/inline/rtems/score/scheduler.inl | 14 +++++++------- cpukit/score/inline/rtems/score/schedulerpriority.inl | 12 ++++++------ cpukit/score/src/schedulerpriority.c | 14 +++++++------- .../src/schedulerprioritythreadschedulerallocate.c | 2 +- cpukit/score/src/schedulerprioritythreadschedulerfree.c | 2 +- .../score/src/schedulerprioritythreadschedulerupdate.c | 2 +- cpukit/score/src/schedulerpriorityyield.c | 2 +- 10 files changed, 45 insertions(+), 34 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index afa70492c5..eafc3c2308 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,15 @@ +2010-11-25 Sebastian Huber + + * sapi/include/confdefs.h, score/include/rtems/score/scheduler.h, + score/inline/rtems/score/scheduler.inl, + score/inline/rtems/score/schedulerpriority.inl, + score/src/schedulerpriority.c, + score/src/schedulerprioritythreadschedulerallocate.c, + score/src/schedulerprioritythreadschedulerfree.c, + score/src/schedulerprioritythreadschedulerupdate.c, + score/src/schedulerpriorityyield.c: Added attribute unused. Renamed + types and fields to follow the Score naming conventions. + 2010-11-25 Sebastian Huber * score/include/rtems/score/scheduler.h, diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index 0a1b49d173..4ef0fb8f24 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -617,7 +617,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper = #ifdef CONFIGURE_INIT /* the table of available schedulers. */ - const Scheduler_Table_t _Scheduler_Table[] = { + const Scheduler_Table_entry _Scheduler_Table[] = { #if defined(CONFIGURE_SCHEDULER_USER) && \ defined(CONFIGURE_SCHEDULER_ENTRY_USER) CONFIGURE_SCHEDULER_ENTRY_USER, diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h index 5b9d8a9554..391dc92992 100644 --- a/cpukit/score/include/rtems/score/scheduler.h +++ b/cpukit/score/include/rtems/score/scheduler.h @@ -38,7 +38,7 @@ extern "C" { /* * These defines are used to set the scheduler_policy value. The values * must correspond directly with the order of the fields in the scheduler - * table (Scheduler_Table_t), because the Configuration.scheduler_policy + * table (Scheduler_Table_entry), because the Configuration.scheduler_policy * field is used to index the scheduler table. */ #define _Scheduler_USER (0) @@ -47,16 +47,15 @@ extern "C" { typedef struct Scheduler_Control_struct Scheduler_Control; /* - * The Scheduler_Table_t type defines the scheduler initialization table, - * which is set up by confdefs.h based on the user's choice of scheduler - * policy. + * This type defines the scheduler initialization table entry, which is set up + * by confdefs.h based on the user's choice of scheduler policy. */ typedef struct { void ( *scheduler_init )( Scheduler_Control * ); -} Scheduler_Table_t; +} Scheduler_Table_entry; /* instantiated and initialized in confdefs.h */ -extern const Scheduler_Table_t _Scheduler_Table[]; +extern const Scheduler_Table_entry _Scheduler_Table[]; /** * The following Scheduler_Per_thread_xxx structures are used to @@ -119,12 +118,12 @@ struct Scheduler_Control_struct { * This is the set of lists (an array of Chain_Control) for * priority scheduling. */ - Chain_Control *Priority; + Chain_Control *priority; - } ready_queues; + } Ready_queues; /** The jump table for scheduler-specific functions */ - Scheduler_Operations operations; + Scheduler_Operations Operations; }; /** diff --git a/cpukit/score/inline/rtems/score/scheduler.inl b/cpukit/score/inline/rtems/score/scheduler.inl index 4a0f10a3f3..81290eb84a 100644 --- a/cpukit/score/inline/rtems/score/scheduler.inl +++ b/cpukit/score/inline/rtems/score/scheduler.inl @@ -51,7 +51,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( Scheduler_Control *the_scheduler ) { - the_scheduler->operations.schedule( the_scheduler ); + the_scheduler->Operations.schedule( the_scheduler ); } /** @brief _Scheduler_Yield @@ -63,7 +63,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { - _Scheduler.operations.yield( &_Scheduler ); + _Scheduler.Operations.yield( &_Scheduler ); } /** @brief _Scheduler_Block @@ -78,7 +78,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Block( Thread_Control *the_thread ) { - the_scheduler->operations.block( the_scheduler, the_thread ); + the_scheduler->Operations.block( the_scheduler, the_thread ); } /** @brief _Scheduler_Unblock @@ -93,7 +93,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { - the_scheduler->operations.unblock( the_scheduler, the_thread ); + the_scheduler->Operations.unblock( the_scheduler, the_thread ); } /** @brief _Scheduler_Thread_scheduler_allocate @@ -106,7 +106,7 @@ RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate( ) { return - the_scheduler->operations.scheduler_allocate( the_scheduler, the_thread ); + the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread ); } /** @brief _Scheduler_Thread_scheduler_free @@ -118,7 +118,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free( Thread_Control *the_thread ) { - return the_scheduler->operations.scheduler_free( the_scheduler, the_thread ); + return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread ); } /** @brief _Scheduler_Thread_scheduler_update @@ -130,7 +130,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_update( Thread_Control *the_thread ) { - the_scheduler->operations.scheduler_update( the_scheduler, the_thread ); + the_scheduler->Operations.scheduler_update( the_scheduler, the_thread ); } /**@}*/ diff --git a/cpukit/score/inline/rtems/score/schedulerpriority.inl b/cpukit/score/inline/rtems/score/schedulerpriority.inl index 11ef2ea9f5..b35682fa67 100644 --- a/cpukit/score/inline/rtems/score/schedulerpriority.inl +++ b/cpukit/score/inline/rtems/score/schedulerpriority.inl @@ -34,17 +34,17 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize( Scheduler_Control *the_scheduler ) { - uint32_t index; + size_t index; /* allocate ready queue structures */ - the_scheduler->ready_queues.Priority = (Chain_Control *) + the_scheduler->Ready_queues.priority = (Chain_Control *) _Workspace_Allocate_or_fatal_error( - (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) + ((size_t) PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); /* initialize ready queue structures */ for( index=0; index <= PRIORITY_MAXIMUM; index++) - _Chain_Initialize_empty( &the_scheduler->ready_queues.Priority[index] ); + _Chain_Initialize_empty( &the_scheduler->Ready_queues.priority[index] ); } /* @@ -194,7 +194,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( - the_scheduler->ready_queues.Priority + the_scheduler->Ready_queues.priority ); } @@ -250,7 +250,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Block_body( */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Unblock_body ( - Scheduler_Control *the_scheduler, + Scheduler_Control *the_scheduler __attribute__((unused)), Thread_Control *the_thread ) { diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c index 5e7ad61d9a..aa7ecee72e 100644 --- a/cpukit/score/src/schedulerpriority.c +++ b/cpukit/score/src/schedulerpriority.c @@ -50,15 +50,15 @@ void _Scheduler_priority_Initialize ( * 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 = + 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 = + the_scheduler->Operations.scheduler_free = &_Scheduler_priority_Thread_scheduler_free; - the_scheduler->operations.scheduler_update = + the_scheduler->Operations.scheduler_update = &_Scheduler_priority_Thread_scheduler_update; _Scheduler_priority_Ready_queue_initialize( the_scheduler ); diff --git a/cpukit/score/src/schedulerprioritythreadschedulerallocate.c b/cpukit/score/src/schedulerprioritythreadschedulerallocate.c index 21595ff778..8dedabea15 100644 --- a/cpukit/score/src/schedulerprioritythreadschedulerallocate.c +++ b/cpukit/score/src/schedulerprioritythreadschedulerallocate.c @@ -39,7 +39,7 @@ */ void* _Scheduler_priority_Thread_scheduler_allocate ( - Scheduler_Control *the_scheduler, + Scheduler_Control *the_scheduler __attribute__((unused)), Thread_Control *the_thread ) { diff --git a/cpukit/score/src/schedulerprioritythreadschedulerfree.c b/cpukit/score/src/schedulerprioritythreadschedulerfree.c index 78226b5fb3..b43ee963b1 100644 --- a/cpukit/score/src/schedulerprioritythreadschedulerfree.c +++ b/cpukit/score/src/schedulerprioritythreadschedulerfree.c @@ -38,7 +38,7 @@ */ void _Scheduler_priority_Thread_scheduler_free ( - Scheduler_Control *the_scheduler, + Scheduler_Control *the_scheduler __attribute__((unused)), Thread_Control *the_thread ) { diff --git a/cpukit/score/src/schedulerprioritythreadschedulerupdate.c b/cpukit/score/src/schedulerprioritythreadschedulerupdate.c index c4c7e815ce..16878111ab 100644 --- a/cpukit/score/src/schedulerprioritythreadschedulerupdate.c +++ b/cpukit/score/src/schedulerprioritythreadschedulerupdate.c @@ -43,7 +43,7 @@ void _Scheduler_priority_Thread_scheduler_update ( Thread_Control *the_thread ) { - Chain_Control *rq = the_scheduler->ready_queues.Priority; + Chain_Control *rq = the_scheduler->Ready_queues.priority; the_thread->scheduler.priority->ready_chain = &rq[ the_thread->current_priority ]; diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c index a8740d9065..e5b6304606 100644 --- a/cpukit/score/src/schedulerpriorityyield.c +++ b/cpukit/score/src/schedulerpriorityyield.c @@ -50,7 +50,7 @@ */ void _Scheduler_priority_Yield( - Scheduler_Control *the_scheduler + Scheduler_Control *the_scheduler __attribute__((unused)) ) { ISR_Level level; -- cgit v1.2.3