forked from Imagelibrary/rtems
2010-07-30 Gedare Bloom <giddyup44@yahoo.com>
PR 1599/cpukit * posix/src/psignalunblockthread.c, posix/src/pthreadkill.c, rtems/src/signalsend.c, score/include/rtems/score/percpu.h, score/inline/rtems/score/thread.inl, score/src/thread.c, score/src/threadchangepriority.c, score/src/threadclearstate.c, score/src/threaddispatch.c, score/src/threadready.c, score/src/threadresume.c, score/src/threadsetstate.c, score/src/threadstartmultitasking.c, score/src/threadsuspend.c, score/src/threadyieldprocessor.c: Rename _Context_Switch_necessary to _Thread_Dispatch_necessary to more properly reflect the intent.
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
2010-07-30 Gedare Bloom <giddyup44@yahoo.com>
|
||||
|
||||
PR 1599/cpukit
|
||||
* posix/src/psignalunblockthread.c, posix/src/pthreadkill.c,
|
||||
rtems/src/signalsend.c, score/include/rtems/score/percpu.h,
|
||||
score/inline/rtems/score/thread.inl, score/src/thread.c,
|
||||
score/src/threadchangepriority.c, score/src/threadclearstate.c,
|
||||
score/src/threaddispatch.c, score/src/threadready.c,
|
||||
score/src/threadresume.c, score/src/threadsetstate.c,
|
||||
score/src/threadstartmultitasking.c, score/src/threadsuspend.c,
|
||||
score/src/threadyieldprocessor.c: Rename _Context_Switch_necessary to
|
||||
_Thread_Dispatch_necessary to more properly reflect the intent.
|
||||
|
||||
2010-07-30 Vinu Rajashekhar <vinutheraj@gmail.com>
|
||||
|
||||
* sapi/include/confdefs.h: Add configuration macros for Go
|
||||
|
||||
@@ -113,7 +113,7 @@ bool _POSIX_signals_Unblock_thread(
|
||||
|
||||
} else if ( the_thread->current_state == STATES_READY ) {
|
||||
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -64,7 +64,7 @@ int pthread_kill(
|
||||
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
|
||||
|
||||
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
}
|
||||
_Thread_Enable_dispatch();
|
||||
return 0;
|
||||
|
||||
@@ -65,7 +65,7 @@ rtems_status_code rtems_signal_send(
|
||||
_ASR_Post_signals( signal_set, &asr->signals_posted );
|
||||
|
||||
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
} else {
|
||||
_ASR_Post_signals( signal_set, &asr->signals_pending );
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ typedef struct {
|
||||
Thread_Control *idle;
|
||||
|
||||
/** This is set to true when this CPU needs to run the dispatcher. */
|
||||
volatile bool dispatch_needed;
|
||||
volatile bool dispatch_necessary;
|
||||
|
||||
} Per_CPU_Control;
|
||||
#endif
|
||||
@@ -160,7 +160,7 @@ extern Per_CPU_Control _Per_CPU_Information;
|
||||
#define _ISR_Nest_level _Per_CPU_Information.isr_nest_level
|
||||
#define _CPU_Interrupt_stack_low _Per_CPU_Information.interrupt_stack_low
|
||||
#define _CPU_Interrupt_stack_high _Per_CPU_Information.interrupt_stack_high
|
||||
#define _Context_Switch_necessary _Per_CPU_Information.dispatch_needed
|
||||
#define _Thread_Dispatch_necessary _Per_CPU_Information.dispatch_necessary
|
||||
|
||||
#endif /* ASM */
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
|
||||
|
||||
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
|
||||
{
|
||||
return ( _Context_Switch_necessary );
|
||||
return ( _Thread_Dispatch_necessary );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -351,7 +351,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_is_dispatch_needed(
|
||||
|
||||
if ( are_signals_pending ||
|
||||
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ void _Thread_Handler_initialization(void)
|
||||
INTERNAL_ERROR_BAD_STACK_HOOK
|
||||
);
|
||||
|
||||
_Context_Switch_necessary = false;
|
||||
_Thread_Dispatch_necessary = false;
|
||||
_Thread_Executing = NULL;
|
||||
_Thread_Heir = NULL;
|
||||
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
|
||||
|
||||
@@ -137,6 +137,6 @@ void _Thread_Change_priority(
|
||||
|
||||
if ( !_Thread_Is_executing_also_the_heir() &&
|
||||
_Thread_Executing->is_preemptible )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
_ISR_Enable( level );
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void _Thread_Clear_state(
|
||||
_Thread_Heir = the_thread;
|
||||
if ( _Thread_Executing->is_preemptible ||
|
||||
the_thread->current_priority == 0 )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,10 +89,10 @@ void _Thread_Dispatch( void )
|
||||
|
||||
executing = _Thread_Executing;
|
||||
_ISR_Disable( level );
|
||||
while ( _Context_Switch_necessary == true ) {
|
||||
while ( _Thread_Dispatch_necessary == true ) {
|
||||
heir = _Thread_Heir;
|
||||
_Thread_Dispatch_disable_level = 1;
|
||||
_Context_Switch_necessary = false;
|
||||
_Thread_Dispatch_necessary = false;
|
||||
_Thread_Executing = heir;
|
||||
|
||||
/*
|
||||
|
||||
@@ -72,7 +72,7 @@ void _Thread_Ready(
|
||||
heir = _Thread_Heir;
|
||||
|
||||
if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
|
||||
_ISR_Enable( level );
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void _Thread_Resume(
|
||||
_Thread_Heir = the_thread;
|
||||
if ( _Thread_Executing->is_preemptible ||
|
||||
the_thread->current_priority == 0 )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void _Thread_Set_state(
|
||||
_Thread_Calculate_heir();
|
||||
|
||||
if ( _Thread_Is_executing( the_thread ) )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
|
||||
_ISR_Enable( level );
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ void _Thread_Start_multitasking( void )
|
||||
|
||||
_System_state_Set( SYSTEM_STATE_UP );
|
||||
|
||||
_Context_Switch_necessary = false;
|
||||
_Thread_Dispatch_necessary = false;
|
||||
|
||||
_Thread_Executing = _Thread_Heir;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ void _Thread_Suspend(
|
||||
_Thread_Calculate_heir();
|
||||
|
||||
if ( _Thread_Is_executing( the_thread ) )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
|
||||
_ISR_Enable( level );
|
||||
}
|
||||
|
||||
@@ -67,10 +67,10 @@ void _Thread_Yield_processor( void )
|
||||
|
||||
if ( _Thread_Is_heir( executing ) )
|
||||
_Thread_Heir = (Thread_Control *) ready->first;
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
}
|
||||
else if ( !_Thread_Is_heir( executing ) )
|
||||
_Context_Switch_necessary = true;
|
||||
_Thread_Dispatch_necessary = true;
|
||||
|
||||
_ISR_Enable( level );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user