コード例 #1
0
void _Scheduler_simple_Update_priority(
  const Scheduler_Control *scheduler,
  Thread_Control          *the_thread,
  Scheduler_Node          *node
)
{
  Scheduler_simple_Context *context;
  bool                      prepend_it;

  if ( !_Thread_Is_ready( the_thread ) ) {
    /* Nothing to do */
    return;
  }

  context = _Scheduler_simple_Get_context( scheduler );
  _Scheduler_Node_get_priority( node, &prepend_it );

  _Scheduler_simple_Extract( scheduler, the_thread, node );

  if ( prepend_it ) {
    _Scheduler_simple_Insert_priority_lifo( &context->Ready, the_thread );
  } else {
    _Scheduler_simple_Insert_priority_fifo( &context->Ready, the_thread );
  }

  _Scheduler_simple_Schedule_body( scheduler, the_thread, false );
}
コード例 #2
0
void _Scheduler_simple_smp_Block(
  Thread_Control   *the_thread
)
{
  _Scheduler_simple_Extract( the_thread );

  _Scheduler_simple_smp_Schedule();
}
コード例 #3
0
void _Scheduler_simple_Block(
  Thread_Control   *the_thread
)
{
  _Scheduler_simple_Extract(the_thread);

  if ( _Thread_Is_heir( the_thread ) )
    _Scheduler_simple_Schedule();

  if ( _Thread_Is_executing( the_thread ) )
    _Thread_Dispatch_necessary = true;
}