diff options
-rw-r--r-- | c/src/exec/score/headers/tqdata.h | 25 | ||||
-rw-r--r-- | c/src/exec/score/include/rtems/score/tqdata.h | 25 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/tqdata.h | 25 |
3 files changed, 75 insertions, 0 deletions
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 @@ -36,6 +36,17 @@ typedef enum { } 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 <rtems/score/tqdata.inl> #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 @@ -36,6 +36,17 @@ typedef enum { } 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 <rtems/score/tqdata.inl> #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 @@ -36,6 +36,17 @@ typedef enum { } 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 <rtems/score/tqdata.inl> #ifdef __cplusplus |