From eb02f47b126b56091ffaeaad470a48e2ac6d57b5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 10 Nov 1999 13:48:27 +0000 Subject: Committed modifications from ITRON Task and Task Dependendent Synchronization Working Group. Included are tests. --- cpukit/score/include/rtems/score/thread.h | 48 ++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'cpukit/score/include') diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 26452bffbe..bfc42b6fad 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -185,6 +185,7 @@ struct Thread_Control_struct { MP_packet_Prefix *receive_packet; #endif /****************** end of common block ********************/ + unsigned32 suspend_count; boolean is_global; boolean do_post_task_switch_extension; @@ -552,6 +553,20 @@ void _Thread_Tickle_timeslice( void ); void _Thread_Yield_processor( void ); +/* + * _Thread_Rotate_Ready_Queue + * + * DESCRIPTION: + * + * This routine is invoked to rotate the ready queue for the + * given priority. It can be used to yeild the processor + * by rotating the executing threads ready queue. + */ + +void _Thread_Rotate_Ready_Queue( + Priority_Control priority +); + /* * _Thread_Load_environment * @@ -623,12 +638,43 @@ void _Thread_Set_priority( Priority_Control new_priority ); +/* + * _Thread_Suspend + * + * DESCRIPTION: + * + * This routine updates the related suspend fields in the_thread + * control block to indicate the current nested level. + */ + +void _Thread_Suspend( + Thread_Control *the_thread +); + +/* + * _Thread_Resume + * + * DESCRIPTION: + * + * This routine updates the related suspend fields in the_thread + * control block to indicate the current nested level. A force + * parameter of TRUE will force a resume and clear the suspend count. + */ + +void _Thread_Resume( + Thread_Control *the_thread, + boolean force +); + /* * _Thread_Evaluate_mode * * DESCRIPTION: * - * This routine XXX + * This routine evaluates the current scheduling information for the + * system and determines if a context switch is required. This + * is usually called after changing an execution mode such as preemptability + * for a thread. */ boolean _Thread_Evaluate_mode( void ); -- cgit v1.2.3