summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-01 19:28:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-01 19:28:52 +0000
commit7f6fab613a58b018dfe051b1dd2cca49a14c222b (patch)
tree0240ecac6587a4d879651f65f0a15a461e55f10e
parentCorrected use of the state WATCHDOG_REINSERT and renamed it (diff)
downloadrtems-7f6fab613a58b018dfe051b1dd2cca49a14c222b.tar.bz2
Made _Event_Sync volatile
Replaced critical section algorithm to correct race conditions. This resulted in the new variable _Event_Sync_state and the type _Event_Sync_states.
-rw-r--r--c/src/exec/rtems/headers/event.h17
-rw-r--r--c/src/exec/rtems/include/rtems/rtems/event.h17
-rw-r--r--cpukit/rtems/include/rtems/rtems/event.h17
3 files changed, 45 insertions, 6 deletions
diff --git a/c/src/exec/rtems/headers/event.h b/c/src/exec/rtems/headers/event.h
index 02cd5ea0c2..1272af576b 100644
--- a/c/src/exec/rtems/headers/event.h
+++ b/c/src/exec/rtems/headers/event.h
@@ -43,6 +43,18 @@ extern "C" {
#define EVENT_CURRENT 0
/*
+ * The following enumerated types indicate what happened while the event
+ * manager was in the synchronization window.
+ */
+
+typedef enum {
+ EVENT_SYNC_NOTHING_HAPPENED,
+ EVENT_SYNC_TIMEOUT,
+ EVENT_SYNC_SATISFIED
+} Event_Sync_states;
+
+
+/*
* _Event_Manager_initialization
*
* DESCRIPTION:
@@ -142,12 +154,13 @@ void _Event_Timeout (
);
/*
- * The following defines the synchronization flag used by the
+ * The following defines the synchronization flags used by the
* Event Manager to insure that signals sent to the currently
* executing thread are received properly.
*/
-EXTERN boolean _Event_Sync; /* event manager sync flag */
+EXTERN volatile boolean _Event_Sync;
+EXTERN volatile Event_Sync_states _Event_Sync_state;
#include <rtems/rtems/eventmp.h>
#include <rtems/rtems/event.inl>
diff --git a/c/src/exec/rtems/include/rtems/rtems/event.h b/c/src/exec/rtems/include/rtems/rtems/event.h
index 02cd5ea0c2..1272af576b 100644
--- a/c/src/exec/rtems/include/rtems/rtems/event.h
+++ b/c/src/exec/rtems/include/rtems/rtems/event.h
@@ -43,6 +43,18 @@ extern "C" {
#define EVENT_CURRENT 0
/*
+ * The following enumerated types indicate what happened while the event
+ * manager was in the synchronization window.
+ */
+
+typedef enum {
+ EVENT_SYNC_NOTHING_HAPPENED,
+ EVENT_SYNC_TIMEOUT,
+ EVENT_SYNC_SATISFIED
+} Event_Sync_states;
+
+
+/*
* _Event_Manager_initialization
*
* DESCRIPTION:
@@ -142,12 +154,13 @@ void _Event_Timeout (
);
/*
- * The following defines the synchronization flag used by the
+ * The following defines the synchronization flags used by the
* Event Manager to insure that signals sent to the currently
* executing thread are received properly.
*/
-EXTERN boolean _Event_Sync; /* event manager sync flag */
+EXTERN volatile boolean _Event_Sync;
+EXTERN volatile Event_Sync_states _Event_Sync_state;
#include <rtems/rtems/eventmp.h>
#include <rtems/rtems/event.inl>
diff --git a/cpukit/rtems/include/rtems/rtems/event.h b/cpukit/rtems/include/rtems/rtems/event.h
index 02cd5ea0c2..1272af576b 100644
--- a/cpukit/rtems/include/rtems/rtems/event.h
+++ b/cpukit/rtems/include/rtems/rtems/event.h
@@ -43,6 +43,18 @@ extern "C" {
#define EVENT_CURRENT 0
/*
+ * The following enumerated types indicate what happened while the event
+ * manager was in the synchronization window.
+ */
+
+typedef enum {
+ EVENT_SYNC_NOTHING_HAPPENED,
+ EVENT_SYNC_TIMEOUT,
+ EVENT_SYNC_SATISFIED
+} Event_Sync_states;
+
+
+/*
* _Event_Manager_initialization
*
* DESCRIPTION:
@@ -142,12 +154,13 @@ void _Event_Timeout (
);
/*
- * The following defines the synchronization flag used by the
+ * The following defines the synchronization flags used by the
* Event Manager to insure that signals sent to the currently
* executing thread are received properly.
*/
-EXTERN boolean _Event_Sync; /* event manager sync flag */
+EXTERN volatile boolean _Event_Sync;
+EXTERN volatile Event_Sync_states _Event_Sync_state;
#include <rtems/rtems/eventmp.h>
#include <rtems/rtems/event.inl>