Changeset 647b95d in rtems for cpukit/score/include/rtems/score/schedulerpriorityimpl.h
- Timestamp:
- 06/10/14 14:32:12 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 8f0c7a46
- Parents:
- 2d36931
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/10/14 14:32:12)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (06/23/14 07:13:00)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/include/rtems/score/schedulerpriorityimpl.h
r2d36931 r647b95d 66 66 67 67 /** 68 * @brief Enqueues a threadon the specified ready queue.69 * 70 * The threadis placed as the last element of its priority group.71 * 72 * @param[in] the_thread The threadto enqueue.68 * @brief Enqueues a node on the specified ready queue. 69 * 70 * The node is placed as the last element of its priority group. 71 * 72 * @param[in] node The node to enqueue. 73 73 * @param[in] ready_queue The ready queue. 74 74 * @param[in] bit_map The priority bit map of the scheduler instance. 75 75 */ 76 76 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue( 77 Thread_Control *the_thread,77 Chain_Node *node, 78 78 Scheduler_priority_Ready_queue *ready_queue, 79 79 Priority_bit_map_Control *bit_map … … 82 82 Chain_Control *ready_chain = ready_queue->ready_chain; 83 83 84 _Chain_Append_unprotected( ready_chain, &the_thread->Object.Node );84 _Chain_Append_unprotected( ready_chain, node ); 85 85 _Priority_bit_map_Add( bit_map, &ready_queue->Priority_map ); 86 86 } 87 87 88 88 /** 89 * @brief Enqueues a threadon the specified ready queue as first.90 * 91 * The threadis placed as the first element of its priority group.92 * 93 * @param[in] the_thread The threadto enqueue as first.89 * @brief Enqueues a node on the specified ready queue as first. 90 * 91 * The node is placed as the first element of its priority group. 92 * 93 * @param[in] node The node to enqueue as first. 94 94 * @param[in] ready_queue The ready queue. 95 95 * @param[in] bit_map The priority bit map of the scheduler instance. 96 96 */ 97 97 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first( 98 Thread_Control *the_thread,98 Chain_Node *node, 99 99 Scheduler_priority_Ready_queue *ready_queue, 100 100 Priority_bit_map_Control *bit_map … … 103 103 Chain_Control *ready_chain = ready_queue->ready_chain; 104 104 105 _Chain_Prepend_unprotected( ready_chain, &the_thread->Object.Node );105 _Chain_Prepend_unprotected( ready_chain, node ); 106 106 _Priority_bit_map_Add( bit_map, &ready_queue->Priority_map ); 107 107 } 108 108 109 109 /** 110 * @brief Extracts a threadfrom the specified ready queue.111 * 112 * @param[in] the_thread The threadto extract.110 * @brief Extracts a node from the specified ready queue. 111 * 112 * @param[in] node The node to extract. 113 113 * @param[in] ready_queue The ready queue. 114 114 * @param[in] bit_map The priority bit map of the scheduler instance. 115 115 */ 116 116 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract( 117 Thread_Control *the_thread,117 Chain_Node *node, 118 118 Scheduler_priority_Ready_queue *ready_queue, 119 119 Priority_bit_map_Control *bit_map … … 126 126 _Priority_bit_map_Remove( bit_map, &ready_queue->Priority_map ); 127 127 } else { 128 _Chain_Extract_unprotected( &the_thread->Object.Node );128 _Chain_Extract_unprotected( node ); 129 129 } 130 130 } … … 140 140 141 141 _Scheduler_priority_Ready_queue_extract( 142 the_thread,142 &the_thread->Object.Node, 143 143 &node->Ready_queue, 144 144 &context->Bit_map … … 147 147 148 148 /** 149 * @brief Return a pointer to the first thread.150 * 151 * This routines returns a pointer to the first threadon @a ready_queues.149 * @brief Return a pointer to the first node. 150 * 151 * This routines returns a pointer to the first node on @a ready_queues. 152 152 * 153 153 * @param[in] bit_map The priority bit map of the scheduler instance. 154 154 * @param[in] ready_queues The ready queues of the scheduler instance. 155 155 * 156 * @return This method returns the first thread or NULL157 */ 158 RTEMS_INLINE_ROUTINE Thread_Control*_Scheduler_priority_Ready_queue_first(156 * @return This method returns the first node. 157 */ 158 RTEMS_INLINE_ROUTINE Chain_Node *_Scheduler_priority_Ready_queue_first( 159 159 Priority_bit_map_Control *bit_map, 160 160 Chain_Control *ready_queues … … 163 163 Priority_Control index = _Priority_bit_map_Get_highest( bit_map ); 164 164 165 return (Thread_Control *)_Chain_First( &ready_queues[ index ] );165 return _Chain_First( &ready_queues[ index ] ); 166 166 } 167 167 … … 180 180 Scheduler_priority_Context *context = 181 181 _Scheduler_priority_Get_context( scheduler ); 182 Thread_Control *heir = _Scheduler_priority_Ready_queue_first( 183 &context->Bit_map, 184 &context->Ready[ 0 ] 185 ); 182 Thread_Control *heir = (Thread_Control *) 183 _Scheduler_priority_Ready_queue_first( 184 &context->Bit_map, 185 &context->Ready[ 0 ] 186 ); 186 187 187 188 ( void ) the_thread;
Note: See TracChangeset
for help on using the changeset viewer.