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:
Joel Sherrill
2010-07-30 18:53:06 +00:00
parent 9d47cd1aef
commit 4b1d26142c
16 changed files with 32 additions and 19 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 );
}

View File

@@ -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 */

View File

@@ -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;
}

View File

@@ -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 )

View File

@@ -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 );
}

View File

@@ -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;
}
}
}

View File

@@ -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;
/*

View File

@@ -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 );
}

View File

@@ -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;
}
}
}

View File

@@ -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 );
}

View File

@@ -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;

View File

@@ -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 );
}

View File

@@ -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 );
}