summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-01 21:07:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-01 21:07:25 +0000
commit4250c8b13da32ebf6a348dc100478ae65c823d5f (patch)
tree92c5b1a2721f517a4335538e4c2f00b10f0db468
parentChanged code for exit from synchronization state to a switch on the (diff)
downloadrtems-4250c8b13da32ebf6a348dc100478ae65c823d5f.tar.bz2
Added support for new synchronization algorithm.
-rw-r--r--c/src/exec/score/headers/tqdata.h25
-rw-r--r--c/src/exec/score/include/rtems/score/tqdata.h25
-rw-r--r--cpukit/score/include/rtems/score/tqdata.h25
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