From 4250c8b13da32ebf6a348dc100478ae65c823d5f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 1 Dec 1995 21:07:25 +0000 Subject: Added support for new synchronization algorithm. --- c/src/exec/score/headers/tqdata.h | 25 +++++++++++++++++++++++++ c/src/exec/score/include/rtems/score/tqdata.h | 25 +++++++++++++++++++++++++ cpukit/score/include/rtems/score/tqdata.h | 25 +++++++++++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/c/src/exec/score/headers/tqdata.h b/c/src/exec/score/headers/tqdata.h index 790f31e317..872a29beb0 100644 --- a/c/src/exec/score/headers/tqdata.h +++ b/c/src/exec/score/headers/tqdata.h @@ -35,6 +35,17 @@ typedef enum { THREAD_QUEUE_DISCIPLINE_PRIORITY /* PRIORITY queue discipline */ } Thread_queue_Disciplines; +/* + * The following enumerated types indicate what happened while the thread + * queue was in the synchronization window. + */ + +typedef enum { + THREAD_QUEUE_NOTHING_HAPPENED, + THREAD_QUEUE_TIMEOUT, + THREAD_QUEUE_SATISFIED +} Thread_queue_states; + /* * The following record defines the control block used * to manage each thread. @@ -49,6 +60,7 @@ typedef struct { /* priority discipline list */ } Queues; boolean sync; /* alloc/dealloc critical section */ + Thread_queue_states sync_state; /* what happened while in sync */ Thread_queue_Disciplines discipline; /* queue discipline */ States_Control state; /* state of threads on Thread_q */ unsigned32 timeout_status; @@ -82,6 +94,19 @@ STATIC INLINE boolean _Thread_queue_Is_reverse_search ( Priority_Control the_priority ); +/* + * _Thread_queue_Enter_critical_section + * + * DESCRIPTION: + * + * This routine is invoked to indicate that the specified thread queue is + * entering a critical section. + */ + +STATIC INLINE void _Thread_queue_Enter_critical_section ( + Thread_queue_Control *the_thread_queue +); + #include #ifdef __cplusplus diff --git a/c/src/exec/score/include/rtems/score/tqdata.h b/c/src/exec/score/include/rtems/score/tqdata.h index 790f31e317..872a29beb0 100644 --- a/c/src/exec/score/include/rtems/score/tqdata.h +++ b/c/src/exec/score/include/rtems/score/tqdata.h @@ -35,6 +35,17 @@ typedef enum { THREAD_QUEUE_DISCIPLINE_PRIORITY /* PRIORITY queue discipline */ } Thread_queue_Disciplines; +/* + * The following enumerated types indicate what happened while the thread + * queue was in the synchronization window. + */ + +typedef enum { + THREAD_QUEUE_NOTHING_HAPPENED, + THREAD_QUEUE_TIMEOUT, + THREAD_QUEUE_SATISFIED +} Thread_queue_states; + /* * The following record defines the control block used * to manage each thread. @@ -49,6 +60,7 @@ typedef struct { /* priority discipline list */ } Queues; boolean sync; /* alloc/dealloc critical section */ + Thread_queue_states sync_state; /* what happened while in sync */ Thread_queue_Disciplines discipline; /* queue discipline */ States_Control state; /* state of threads on Thread_q */ unsigned32 timeout_status; @@ -82,6 +94,19 @@ STATIC INLINE boolean _Thread_queue_Is_reverse_search ( Priority_Control the_priority ); +/* + * _Thread_queue_Enter_critical_section + * + * DESCRIPTION: + * + * This routine is invoked to indicate that the specified thread queue is + * entering a critical section. + */ + +STATIC INLINE void _Thread_queue_Enter_critical_section ( + Thread_queue_Control *the_thread_queue +); + #include #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/tqdata.h b/cpukit/score/include/rtems/score/tqdata.h index 790f31e317..872a29beb0 100644 --- a/cpukit/score/include/rtems/score/tqdata.h +++ b/cpukit/score/include/rtems/score/tqdata.h @@ -35,6 +35,17 @@ typedef enum { THREAD_QUEUE_DISCIPLINE_PRIORITY /* PRIORITY queue discipline */ } Thread_queue_Disciplines; +/* + * The following enumerated types indicate what happened while the thread + * queue was in the synchronization window. + */ + +typedef enum { + THREAD_QUEUE_NOTHING_HAPPENED, + THREAD_QUEUE_TIMEOUT, + THREAD_QUEUE_SATISFIED +} Thread_queue_states; + /* * The following record defines the control block used * to manage each thread. @@ -49,6 +60,7 @@ typedef struct { /* priority discipline list */ } Queues; boolean sync; /* alloc/dealloc critical section */ + Thread_queue_states sync_state; /* what happened while in sync */ Thread_queue_Disciplines discipline; /* queue discipline */ States_Control state; /* state of threads on Thread_q */ unsigned32 timeout_status; @@ -82,6 +94,19 @@ STATIC INLINE boolean _Thread_queue_Is_reverse_search ( Priority_Control the_priority ); +/* + * _Thread_queue_Enter_critical_section + * + * DESCRIPTION: + * + * This routine is invoked to indicate that the specified thread queue is + * entering a critical section. + */ + +STATIC INLINE void _Thread_queue_Enter_critical_section ( + Thread_queue_Control *the_thread_queue +); + #include #ifdef __cplusplus -- cgit v1.2.3