[rtems commit] rtems: Create event implementation header

Sebastian Huber sebh at rtems.org
Tue Jul 23 13:09:29 UTC 2013


Module:    rtems
Branch:    master
Commit:    e151eb1a362500a643e0631a5557af28213ebde6
Changeset: http://git.rtems.org/rtems/commit/?id=e151eb1a362500a643e0631a5557af28213ebde6

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jul 23 12:47:35 2013 +0200

rtems: Create event implementation header

Move implementation specific parts of event.h, event.inl, eventset.h and
eventset.inl into new header file eventimpl.h.  The event.h contains now
only the application visible API.

---

 cpukit/libmisc/monitor/mon-prmisc.c          |    2 +-
 cpukit/rtems/Makefile.am                     |    4 +-
 cpukit/rtems/include/rtems/rtems/event.h     |  185 +++++++++++++-------------
 cpukit/rtems/include/rtems/rtems/eventimpl.h |  179 +++++++++++++++++++++++++
 cpukit/rtems/include/rtems/rtems/eventmp.h   |    5 +-
 cpukit/rtems/include/rtems/rtems/eventset.h  |  146 --------------------
 cpukit/rtems/inline/rtems/rtems/event.inl    |   36 -----
 cpukit/rtems/inline/rtems/rtems/eventset.inl |   87 ------------
 cpukit/rtems/preinstall.am                   |   14 +--
 cpukit/rtems/src/event.c                     |   13 +--
 cpukit/rtems/src/eventdata.c                 |    3 +-
 cpukit/rtems/src/eventreceive.c              |    2 +-
 cpukit/rtems/src/eventseize.c                |    2 +-
 cpukit/rtems/src/eventsend.c                 |    2 +-
 cpukit/rtems/src/eventsurrender.c            |    2 +-
 cpukit/rtems/src/eventtimeout.c              |    2 +-
 cpukit/rtems/src/systemeventreceive.c        |    2 +-
 cpukit/rtems/src/systemeventsend.c           |    2 +-
 cpukit/rtems/src/tasks.c                     |    1 +
 cpukit/sapi/src/rtemsapi.c                   |    2 +-
 testsuites/sptests/sp39/init.c               |    2 +
 testsuites/sptests/spintrcritical10/init.c   |    2 +
 testsuites/sptests/spsize/size.c             |    6 +-
 23 files changed, 302 insertions(+), 399 deletions(-)

diff --git a/cpukit/libmisc/monitor/mon-prmisc.c b/cpukit/libmisc/monitor/mon-prmisc.c
index aff5403..e01d486 100644
--- a/cpukit/libmisc/monitor/mon-prmisc.c
+++ b/cpukit/libmisc/monitor/mon-prmisc.c
@@ -238,7 +238,7 @@ static const rtems_assoc_t rtems_monitor_events_assoc[] = {
 int
 rtems_monitor_dump_events(rtems_event_set events)
 {
-    if (events == EVENT_SETS_NONE_PENDING)  /* value is 0 */
+    if (events == 0)
         return fprintf(stdout,"  NONE  ");
 
     return fprintf(stdout,"%08" PRIx32, events);
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index c28c82f..285d440 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -25,7 +25,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/clock.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/config.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/dpmem.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/event.h
-include_rtems_rtems_HEADERS += include/rtems/rtems/eventset.h
+include_rtems_rtems_HEADERS += include/rtems/rtems/eventimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/intr.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/message.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/messageimpl.h
@@ -66,8 +66,6 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/taskmp.h
 endif
 
 include_rtems_rtems_HEADERS += inline/rtems/rtems/dpmem.inl
-include_rtems_rtems_HEADERS += inline/rtems/rtems/event.inl
-include_rtems_rtems_HEADERS += inline/rtems/rtems/eventset.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/part.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/ratemon.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/region.inl
diff --git a/cpukit/rtems/include/rtems/rtems/event.h b/cpukit/rtems/include/rtems/rtems/event.h
index 6a27c91..b2a215b 100644
--- a/cpukit/rtems/include/rtems/rtems/event.h
+++ b/cpukit/rtems/include/rtems/rtems/event.h
@@ -28,28 +28,99 @@
 #ifndef _RTEMS_RTEMS_EVENT_H
 #define _RTEMS_RTEMS_EVENT_H
 
-/**
- *  This constant is defined to extern most of the time when using
- *  this header file.  However by defining it to nothing, the data
- *  declared in this header file can be instantiated.  This is done
- *  in a single per manager file.
- */
-#ifndef RTEMS_EVENT_EXTERN
-#define RTEMS_EVENT_EXTERN extern
-#endif
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/types.h>
+#include <rtems/rtems/options.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <rtems/score/object.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadsync.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/eventset.h>
+/**
+ *  @defgroup ClassicEventSet Event Set
+ *
+ *  @ingroup ClassicEvent
+ *
+ *  @{
+ */
+
+/**
+ *  @brief Integer type to hold an event set of up to 32 events represented as
+ *  a bit field.
+ */
+typedef uint32_t   rtems_event_set;
+
+/**
+ *  @brief Constant used to send or receive all events.
+ */
+#define RTEMS_ALL_EVENTS  0xFFFFFFFF
+
+/** @brief Defines the bit in the event set associated with event 0. */
+#define RTEMS_EVENT_0     0x00000001
+/** @brief Defines the bit in the event set associated with event 1. */
+#define RTEMS_EVENT_1     0x00000002
+/** @brief Defines the bit in the event set associated with event 2. */
+#define RTEMS_EVENT_2     0x00000004
+/** @brief Defines the bit in the event set associated with event 3. */
+#define RTEMS_EVENT_3     0x00000008
+/** @brief Defines the bit in the event set associated with event 4. */
+#define RTEMS_EVENT_4     0x00000010
+/** @brief Defines the bit in the event set associated with event 5. */
+#define RTEMS_EVENT_5     0x00000020
+/** @brief Defines the bit in the event set associated with event 6. */
+#define RTEMS_EVENT_6     0x00000040
+/** @brief Defines the bit in the event set associated with event 7. */
+#define RTEMS_EVENT_7     0x00000080
+/** @brief Defines the bit in the event set associated with event 8. */
+#define RTEMS_EVENT_8     0x00000100
+/** @brief Defines the bit in the event set associated with event 9. */
+#define RTEMS_EVENT_9     0x00000200
+/** @brief Defines the bit in the event set associated with event 10. */
+#define RTEMS_EVENT_10    0x00000400
+/** @brief Defines the bit in the event set associated with event 11. */
+#define RTEMS_EVENT_11    0x00000800
+/** @brief Defines the bit in the event set associated with event 12. */
+#define RTEMS_EVENT_12    0x00001000
+/** @brief Defines the bit in the event set associated with event 13. */
+#define RTEMS_EVENT_13    0x00002000
+/** @brief Defines the bit in the event set associated with event 14. */
+#define RTEMS_EVENT_14    0x00004000
+/** @brief Defines the bit in the event set associated with event 15. */
+#define RTEMS_EVENT_15    0x00008000
+/** @brief Defines the bit in the event set associated with event 16. */
+#define RTEMS_EVENT_16    0x00010000
+/** @brief Defines the bit in the event set associated with event 17. */
+#define RTEMS_EVENT_17    0x00020000
+/** @brief Defines the bit in the event set associated with event 18. */
+#define RTEMS_EVENT_18    0x00040000
+/** @brief Defines the bit in the event set associated with event 19. */
+#define RTEMS_EVENT_19    0x00080000
+/** @brief Defines the bit in the event set associated with event 20. */
+#define RTEMS_EVENT_20    0x00100000
+/** @brief Defines the bit in the event set associated with event 21. */
+#define RTEMS_EVENT_21    0x00200000
+/** @brief Defines the bit in the event set associated with event 22. */
+#define RTEMS_EVENT_22    0x00400000
+/** @brief Defines the bit in the event set associated with event 23. */
+#define RTEMS_EVENT_23    0x00800000
+/** @brief Defines the bit in the event set associated with event 24. */
+#define RTEMS_EVENT_24    0x01000000
+/** @brief Defines the bit in the event set associated with event 25. */
+#define RTEMS_EVENT_25    0x02000000
+/** @brief Defines the bit in the event set associated with event 26. */
+#define RTEMS_EVENT_26    0x04000000
+/** @brief Defines the bit in the event set associated with event 27. */
+#define RTEMS_EVENT_27    0x08000000
+/** @brief Defines the bit in the event set associated with event 29. */
+#define RTEMS_EVENT_28    0x10000000
+/** @brief Defines the bit in the event set associated with event 29. */
+#define RTEMS_EVENT_29    0x20000000
+/** @brief Defines the bit in the event set associated with event 30. */
+#define RTEMS_EVENT_30    0x40000000
+/** @brief Defines the bit in the event set associated with event 31. */
+#define RTEMS_EVENT_31    0x80000000
+
+/** @} */
 
 /**
  *  @defgroup ClassicEvent Events
@@ -103,6 +174,12 @@ extern "C" {
  */
 
 /**
+ *  @brief Constant used to receive the set of currently pending events in
+ *  rtems_event_receive().
+ */
+#define RTEMS_PENDING_EVENTS      0
+
+/**
  * @brief Sends an Event Set to the Target Task
  *
  * This directive sends an event set @a event_in to the task specified by
@@ -420,84 +497,10 @@ RTEMS_INLINE_ROUTINE void rtems_event_transient_clear( void )
 
 /** @} */
 
-/**
- *  @defgroup ScoreEvent Event Handler
- *
- *  @ingroup Score
- *
- *  @{
- */
-
 typedef struct {
   rtems_event_set pending_events;
 } Event_Control;
 
-/**
- *  This constant is passed as the event_in to the
- *  rtems_event_receive directive to determine which events are pending.
- */
-#define EVENT_CURRENT  0
-
-/**
- *  @brief Event Manager Initialization
- *
- *  Event Manager
- *
- *  This routine performs the initialization necessary for this manager.
- *
- *  - INTERRUPT LATENCY:
- *    + single case
- */
-void _Event_Manager_initialization( void );
-
-void _Event_Seize(
-  rtems_event_set                   event_in,
-  rtems_option                      option_set,
-  rtems_interval                    ticks,
-  rtems_event_set                  *event_out,
-  Thread_Control                   *executing,
-  Event_Control                    *event,
-  Thread_blocking_operation_States *sync_state,
-  States_Control                    wait_state
-);
-
-/**
- *  @brief Surrender Event
- *
- *  - INTERRUPT LATENCY:
- *    + before flash
- *    + after flash
- *    + check sync
- */
-void _Event_Surrender(
-  Thread_Control                   *the_thread,
-  rtems_event_set                   event_in,
-  Event_Control                    *event,
-  Thread_blocking_operation_States *sync_state,
-  States_Control                    wait_state
-);
-
-/**
- *  @brief Timeout Event
- */
-void _Event_Timeout(
-  Objects_Id  id,
-  void       *arg
-);
-
-RTEMS_EVENT_EXTERN Thread_blocking_operation_States _Event_Sync_state;
-
-RTEMS_EVENT_EXTERN Thread_blocking_operation_States _System_event_Sync_state;
-
-/** @} */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/eventmp.h>
-#endif
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/event.inl>
-#endif
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/cpukit/rtems/include/rtems/rtems/eventimpl.h b/cpukit/rtems/include/rtems/rtems/eventimpl.h
new file mode 100644
index 0000000..1c46a7a
--- /dev/null
+++ b/cpukit/rtems/include/rtems/rtems/eventimpl.h
@@ -0,0 +1,179 @@
+/**
+ * @file
+ *
+ * @ingroup ClassicEventImpl
+ *
+ * @brief Classic Event Implementation
+ */
+
+/*  COPYRIGHT (c) 1989-2008.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ */
+
+#ifndef _RTEMS_RTEMS_EVENT_INL
+#define _RTEMS_RTEMS_EVENT_INL
+
+#include <rtems/rtems/event.h>
+#include <rtems/score/thread.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup ClassicEventImpl Classic Event Implementation
+ *
+ * @ingroup ClassicEvent
+ *
+ * @{
+ */
+
+/**
+ *  This constant is defined to extern most of the time when using
+ *  this header file.  However by defining it to nothing, the data
+ *  declared in this header file can be instantiated.  This is done
+ *  in a single per manager file.
+ */
+#ifndef RTEMS_EVENT_EXTERN
+#define RTEMS_EVENT_EXTERN extern
+#endif
+
+/**
+ *  This constant is passed as the event_in to the
+ *  rtems_event_receive directive to determine which events are pending.
+ */
+#define EVENT_CURRENT  0
+
+/**
+ *  The following constant is the value of an event set which
+ *  has no events pending.
+ */
+#define EVENT_SETS_NONE_PENDING 0
+
+RTEMS_EVENT_EXTERN Thread_blocking_operation_States _Event_Sync_state;
+
+RTEMS_EVENT_EXTERN Thread_blocking_operation_States _System_event_Sync_state;
+
+/**
+ *  @brief Event Manager Initialization
+ *
+ *  Event Manager
+ *
+ *  This routine performs the initialization necessary for this manager.
+ *
+ *  - INTERRUPT LATENCY:
+ *    + single case
+ */
+void _Event_Manager_initialization( void );
+
+void _Event_Seize(
+  rtems_event_set                   event_in,
+  rtems_option                      option_set,
+  rtems_interval                    ticks,
+  rtems_event_set                  *event_out,
+  Thread_Control                   *executing,
+  Event_Control                    *event,
+  Thread_blocking_operation_States *sync_state,
+  States_Control                    wait_state
+);
+
+/**
+ *  @brief Surrender Event
+ *
+ *  - INTERRUPT LATENCY:
+ *    + before flash
+ *    + after flash
+ *    + check sync
+ */
+void _Event_Surrender(
+  Thread_Control                   *the_thread,
+  rtems_event_set                   event_in,
+  Event_Control                    *event,
+  Thread_blocking_operation_States *sync_state,
+  States_Control                    wait_state
+);
+
+/**
+ *  @brief Timeout Event
+ */
+void _Event_Timeout(
+  Objects_Id  id,
+  void       *arg
+);
+
+RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
+{
+  event->pending_events = EVENT_SETS_NONE_PENDING;
+}
+
+/**
+ *  @brief Checks if on events are posted in the event_set.
+ *
+ *  This function returns TRUE if on events are posted in the event_set,
+ *  and FALSE otherwise.
+ */
+RTEMS_INLINE_ROUTINE bool _Event_sets_Is_empty(
+  rtems_event_set the_event_set
+)
+{
+  return ( the_event_set == 0 );
+}
+
+/**
+ *  @brief Posts the given new_events into the event_set passed in.
+ *
+ *  This routine posts the given new_events into the event_set
+ *  passed in.  The result is returned to the user in event_set.
+ */
+RTEMS_INLINE_ROUTINE void _Event_sets_Post(
+  rtems_event_set  the_new_events,
+  rtems_event_set *the_event_set
+)
+{
+  *the_event_set |= the_new_events;
+}
+
+/**
+ *  @brief Returns the events in event_condition that are set in event_set.
+ *
+ *  This function returns the events in event_condition which are
+ *  set in event_set.
+ */
+RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
+  rtems_event_set the_event_set,
+  rtems_event_set the_event_condition
+)
+{
+   return ( the_event_set & the_event_condition );
+}
+
+/**
+ *  @brief Removes the events in mask from the event_set passed in.
+ *
+ *  This function removes the events in mask from the event_set
+ *  passed in.  The result is returned to the user in event_set.
+ */
+RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
+ rtems_event_set the_event_set,
+ rtems_event_set the_mask
+)
+{
+   return ( the_event_set & ~(the_mask) );
+}
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(RTEMS_MULTIPROCESSING)
+#include <rtems/rtems/eventmp.h>
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/eventmp.h b/cpukit/rtems/include/rtems/rtems/eventmp.h
index 45f60b6..128cc4e 100644
--- a/cpukit/rtems/include/rtems/rtems/eventmp.h
+++ b/cpukit/rtems/include/rtems/rtems/eventmp.h
@@ -21,11 +21,14 @@
 #ifndef _RTEMS_RTEMS_EVENTMP_H
 #define _RTEMS_RTEMS_EVENTMP_H
 
+#ifndef _RTEMS_RTEMS_EVENTIMPL_H
+# error "Never use <rtems/rtems/eventmp.h> directly; include <rtems/rtems/eventimpl.h> instead."
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <rtems/rtems/event.h>
 #include <rtems/score/mppkt.h>
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/include/rtems/rtems/eventset.h b/cpukit/rtems/include/rtems/rtems/eventset.h
deleted file mode 100644
index 4d2bff8..0000000
--- a/cpukit/rtems/include/rtems/rtems/eventset.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * @file rtems/rtems/eventset.h
- *
- * @defgroup ClassicEventSet Event Set
- *
- * @ingroup ClassicRTEMS
- * @brief Event Sets Handler
- *
- * This include file contains the information pertaining to the
- * Event Sets Handler. This handler provides methods for the manipulation
- * of event sets which will be sent and received by tasks.
- */
-
-/* COPYRIGHT (c) 1989-2008.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
-
-#ifndef _RTEMS_RTEMS_EVENTSET_H
-#define _RTEMS_RTEMS_EVENTSET_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  @defgroup ClassicEventSet Event Set
- *
- *  @ingroup ClassicEvent
- *
- *  @{
- */
-
-/**
- *  @brief Integer type to hold an event set of up to 32 events represented as
- *  a bit field.
- */
-typedef uint32_t   rtems_event_set;
-
-/**
- *  @brief Constant used to send or receive all events.
- */
-#define RTEMS_ALL_EVENTS  0xFFFFFFFF
-
-/** @brief Defines the bit in the event set associated with event 0. */
-#define RTEMS_EVENT_0     0x00000001
-/** @brief Defines the bit in the event set associated with event 1. */
-#define RTEMS_EVENT_1     0x00000002
-/** @brief Defines the bit in the event set associated with event 2. */
-#define RTEMS_EVENT_2     0x00000004
-/** @brief Defines the bit in the event set associated with event 3. */
-#define RTEMS_EVENT_3     0x00000008
-/** @brief Defines the bit in the event set associated with event 4. */
-#define RTEMS_EVENT_4     0x00000010
-/** @brief Defines the bit in the event set associated with event 5. */
-#define RTEMS_EVENT_5     0x00000020
-/** @brief Defines the bit in the event set associated with event 6. */
-#define RTEMS_EVENT_6     0x00000040
-/** @brief Defines the bit in the event set associated with event 7. */
-#define RTEMS_EVENT_7     0x00000080
-/** @brief Defines the bit in the event set associated with event 8. */
-#define RTEMS_EVENT_8     0x00000100
-/** @brief Defines the bit in the event set associated with event 9. */
-#define RTEMS_EVENT_9     0x00000200
-/** @brief Defines the bit in the event set associated with event 10. */
-#define RTEMS_EVENT_10    0x00000400
-/** @brief Defines the bit in the event set associated with event 11. */
-#define RTEMS_EVENT_11    0x00000800
-/** @brief Defines the bit in the event set associated with event 12. */
-#define RTEMS_EVENT_12    0x00001000
-/** @brief Defines the bit in the event set associated with event 13. */
-#define RTEMS_EVENT_13    0x00002000
-/** @brief Defines the bit in the event set associated with event 14. */
-#define RTEMS_EVENT_14    0x00004000
-/** @brief Defines the bit in the event set associated with event 15. */
-#define RTEMS_EVENT_15    0x00008000
-/** @brief Defines the bit in the event set associated with event 16. */
-#define RTEMS_EVENT_16    0x00010000
-/** @brief Defines the bit in the event set associated with event 17. */
-#define RTEMS_EVENT_17    0x00020000
-/** @brief Defines the bit in the event set associated with event 18. */
-#define RTEMS_EVENT_18    0x00040000
-/** @brief Defines the bit in the event set associated with event 19. */
-#define RTEMS_EVENT_19    0x00080000
-/** @brief Defines the bit in the event set associated with event 20. */
-#define RTEMS_EVENT_20    0x00100000
-/** @brief Defines the bit in the event set associated with event 21. */
-#define RTEMS_EVENT_21    0x00200000
-/** @brief Defines the bit in the event set associated with event 22. */
-#define RTEMS_EVENT_22    0x00400000
-/** @brief Defines the bit in the event set associated with event 23. */
-#define RTEMS_EVENT_23    0x00800000
-/** @brief Defines the bit in the event set associated with event 24. */
-#define RTEMS_EVENT_24    0x01000000
-/** @brief Defines the bit in the event set associated with event 25. */
-#define RTEMS_EVENT_25    0x02000000
-/** @brief Defines the bit in the event set associated with event 26. */
-#define RTEMS_EVENT_26    0x04000000
-/** @brief Defines the bit in the event set associated with event 27. */
-#define RTEMS_EVENT_27    0x08000000
-/** @brief Defines the bit in the event set associated with event 29. */
-#define RTEMS_EVENT_28    0x10000000
-/** @brief Defines the bit in the event set associated with event 29. */
-#define RTEMS_EVENT_29    0x20000000
-/** @brief Defines the bit in the event set associated with event 30. */
-#define RTEMS_EVENT_30    0x40000000
-/** @brief Defines the bit in the event set associated with event 31. */
-#define RTEMS_EVENT_31    0x80000000
-
-/** @} */
-
-/**
- *  @brief Constant used to receive the set of currently pending events in
- *  rtems_event_receive().
- *
- *  @ingroup ClassicEvent
- */
-#define RTEMS_PENDING_EVENTS      0
-
-/**
- *  @addtogroup ScoreEvent
- *
- *  @{
- */
-
-/**
- *  The following constant is the value of an event set which
- *  has no events pending.
- */
-#define EVENT_SETS_NONE_PENDING 0
-
-/** @} */
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/eventset.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/event.inl b/cpukit/rtems/inline/rtems/rtems/event.inl
deleted file mode 100644
index 32999fa..0000000
--- a/cpukit/rtems/inline/rtems/rtems/event.inl
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * @file rtems/rtems/event.inl
- *
- *  This include file contains the static inline implementation of
- *  macros for the Event Manager.
- */
-
-/*  COPYRIGHT (c) 1989-2008.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.com/license/LICENSE.
- */
-
-#ifndef _RTEMS_RTEMS_EVENT_H
-# error "Never use <rtems/rtems/event.inl> directly; include <rtems/rtems/event.h> instead."
-#endif
-
-#ifndef _RTEMS_RTEMS_EVENT_INL
-#define _RTEMS_RTEMS_EVENT_INL
-
-/**
- *  @addtogroup ClassicEvent
- *  @{
- */
-
-RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
-{
-  event->pending_events = EVENT_SETS_NONE_PENDING;
-}
-
-/**@}*/
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/eventset.inl b/cpukit/rtems/inline/rtems/rtems/eventset.inl
deleted file mode 100644
index ee9447c..0000000
--- a/cpukit/rtems/inline/rtems/rtems/eventset.inl
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * @file rtems/rtems/eventset.inl
- *
- *  This include file contains the information pertaining to event sets.
- */
-
-/*  COPYRIGHT (c) 1989-2008.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.com/license/LICENSE.
- */
-
-#ifndef _RTEMS_RTEMS_EVENTSET_H
-# error "Never use <rtems/rtems/eventset.inl> directly; include <rtems/rtems/eventset.h> instead."
-#endif
-
-#ifndef _RTEMS_RTEMS_EVENTSET_INL
-#define _RTEMS_RTEMS_EVENTSET_INL
-
-#include <rtems/score/basedefs.h> /* RTEMS_INLINE_ROUTINE */
-
-/**
- *  @addtogroup ScoreEvent
- *  @{
- */
-
-/**
- *  @brief Checks if on events are posted in the event_set.
- *
- *  This function returns TRUE if on events are posted in the event_set,
- *  and FALSE otherwise.
- */
-RTEMS_INLINE_ROUTINE bool _Event_sets_Is_empty(
-  rtems_event_set the_event_set
-)
-{
-  return ( the_event_set == 0 );
-}
-
-/**
- *  @brief Posts the given new_events into the event_set passed in.
- *
- *  This routine posts the given new_events into the event_set
- *  passed in.  The result is returned to the user in event_set.
- */
-RTEMS_INLINE_ROUTINE void _Event_sets_Post(
-  rtems_event_set  the_new_events,
-  rtems_event_set *the_event_set
-)
-{
-  *the_event_set |= the_new_events;
-}
-
-/**
- *  @brief Returns the events in event_condition that are set in event_set.
- *
- *  This function returns the events in event_condition which are
- *  set in event_set.
- */
-RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
-  rtems_event_set the_event_set,
-  rtems_event_set the_event_condition
-)
-{
-   return ( the_event_set & the_event_condition );
-}
-
-/**
- *  @brief Removes the events in mask from the event_set passed in.
- *
- *  This function removes the events in mask from the event_set
- *  passed in.  The result is returned to the user in event_set.
- */
-RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
- rtems_event_set the_event_set,
- rtems_event_set the_mask
-)
-{
-   return ( the_event_set & ~(the_mask) );
-}
-
-/**@}*/
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am
index e853e92..19e5bd6 100644
--- a/cpukit/rtems/preinstall.am
+++ b/cpukit/rtems/preinstall.am
@@ -71,9 +71,9 @@ $(PROJECT_INCLUDE)/rtems/rtems/event.h: include/rtems/rtems/event.h $(PROJECT_IN
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/event.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/event.h
 
-$(PROJECT_INCLUDE)/rtems/rtems/eventset.h: include/rtems/rtems/eventset.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/eventset.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/eventset.h
+$(PROJECT_INCLUDE)/rtems/rtems/eventimpl.h: include/rtems/rtems/eventimpl.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/eventimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/eventimpl.h
 
 $(PROJECT_INCLUDE)/rtems/rtems/intr.h: include/rtems/rtems/intr.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/intr.h
@@ -209,14 +209,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/dpmem.inl: inline/rtems/rtems/dpmem.inl $(PROJECT
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/dpmem.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/dpmem.inl
 
-$(PROJECT_INCLUDE)/rtems/rtems/event.inl: inline/rtems/rtems/event.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/event.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/event.inl
-
-$(PROJECT_INCLUDE)/rtems/rtems/eventset.inl: inline/rtems/rtems/eventset.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/eventset.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/eventset.inl
-
 $(PROJECT_INCLUDE)/rtems/rtems/part.inl: inline/rtems/rtems/part.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/part.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/part.inl
diff --git a/cpukit/rtems/src/event.c b/cpukit/rtems/src/event.c
index 9be4946..5e058c3 100644
--- a/cpukit/rtems/src/event.c
+++ b/cpukit/rtems/src/event.c
@@ -18,15 +18,10 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
+#include <rtems/rtems/eventimpl.h>
+#if defined(RTEMS_MULTIPROCESSING)
+#include <rtems/score/mpci.h>
+#endif
 
 void _Event_Manager_initialization( void )
 {
diff --git a/cpukit/rtems/src/eventdata.c b/cpukit/rtems/src/eventdata.c
index df026bd..8db3fd9 100644
--- a/cpukit/rtems/src/eventdata.c
+++ b/cpukit/rtems/src/eventdata.c
@@ -20,5 +20,4 @@
 
 #define RTEMS_EVENT_EXTERN
 
-#include <rtems/system.h>
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
diff --git a/cpukit/rtems/src/eventreceive.c b/cpukit/rtems/src/eventreceive.c
index d2d0e02..d7a21c3 100644
--- a/cpukit/rtems/src/eventreceive.c
+++ b/cpukit/rtems/src/eventreceive.c
@@ -18,7 +18,7 @@
   #include "config.h"
 #endif
 
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/tasks.h>
 
 rtems_status_code rtems_event_receive(
diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
index be7546f..995aeb4 100644
--- a/cpukit/rtems/src/eventseize.c
+++ b/cpukit/rtems/src/eventseize.c
@@ -18,7 +18,7 @@
   #include "config.h"
 #endif
 
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/optionsimpl.h>
 #include <rtems/score/watchdogimpl.h>
 
diff --git a/cpukit/rtems/src/eventsend.c b/cpukit/rtems/src/eventsend.c
index b72317c..c7d874a 100644
--- a/cpukit/rtems/src/eventsend.c
+++ b/cpukit/rtems/src/eventsend.c
@@ -18,7 +18,7 @@
   #include "config.h"
 #endif
 
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/tasks.h>
 
 rtems_status_code rtems_event_send(
diff --git a/cpukit/rtems/src/eventsurrender.c b/cpukit/rtems/src/eventsurrender.c
index 9ce5a75..10453fe 100644
--- a/cpukit/rtems/src/eventsurrender.c
+++ b/cpukit/rtems/src/eventsurrender.c
@@ -18,7 +18,7 @@
   #include "config.h"
 #endif
 
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/optionsimpl.h>
 #include <rtems/score/watchdogimpl.h>
 
diff --git a/cpukit/rtems/src/eventtimeout.c b/cpukit/rtems/src/eventtimeout.c
index 9d244f0..4ec7fa0 100644
--- a/cpukit/rtems/src/eventtimeout.c
+++ b/cpukit/rtems/src/eventtimeout.c
@@ -18,7 +18,7 @@
   #include "config.h"
 #endif
 
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 
 void _Event_Timeout(
   Objects_Id  id,
diff --git a/cpukit/rtems/src/systemeventreceive.c b/cpukit/rtems/src/systemeventreceive.c
index 249dc77..7e78cff 100644
--- a/cpukit/rtems/src/systemeventreceive.c
+++ b/cpukit/rtems/src/systemeventreceive.c
@@ -24,7 +24,7 @@
   #include "config.h"
 #endif
 
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/tasks.h>
 
 rtems_status_code rtems_event_system_receive(
diff --git a/cpukit/rtems/src/systemeventsend.c b/cpukit/rtems/src/systemeventsend.c
index 3c3fe46..73aa2e1 100644
--- a/cpukit/rtems/src/systemeventsend.c
+++ b/cpukit/rtems/src/systemeventsend.c
@@ -24,7 +24,7 @@
   #include "config.h"
 #endif
 
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/tasks.h>
 
 rtems_status_code rtems_event_system_send(
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
index b586487..1e01211 100644
--- a/cpukit/rtems/src/tasks.c
+++ b/cpukit/rtems/src/tasks.c
@@ -21,6 +21,7 @@
 #include <rtems/system.h>
 #include <rtems/config.h>
 #include <rtems/rtems/asrimpl.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/support.h>
 #include <rtems/rtems/modes.h>
diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c
index dcf6fc0..22be0f1 100644
--- a/cpukit/sapi/src/rtemsapi.c
+++ b/cpukit/sapi/src/rtemsapi.c
@@ -30,7 +30,7 @@
 #include <rtems/rtems/clock.h>
 #include <rtems/rtems/tasks.h>
 #include <rtems/rtems/dpmem.h>
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/messageimpl.h>
 #if defined(RTEMS_MULTIPROCESSING)
 #include <rtems/rtems/mp.h>
diff --git a/testsuites/sptests/sp39/init.c b/testsuites/sptests/sp39/init.c
index b3931c9..deb19cb 100644
--- a/testsuites/sptests/sp39/init.c
+++ b/testsuites/sptests/sp39/init.c
@@ -16,6 +16,8 @@
 #define CONFIGURE_INIT
 #include "system.h"
 
+#include <rtems/rtems/eventimpl.h>
+
 /*
  *  ERROR CHECKING NOTE:
  *
diff --git a/testsuites/sptests/spintrcritical10/init.c b/testsuites/sptests/spintrcritical10/init.c
index 5334a26..28fb755 100644
--- a/testsuites/sptests/spintrcritical10/init.c
+++ b/testsuites/sptests/spintrcritical10/init.c
@@ -17,6 +17,8 @@
 #include <tmacros.h>
 #include <intrcritical.h>
 
+#include <rtems/rtems/eventimpl.h>
+
 #define GREEN RTEMS_EVENT_0
 
 #define RED RTEMS_EVENT_1
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 2754ce8..f12770f 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -21,7 +21,7 @@
 #include <rtems/rtems/clock.h>
 #include <rtems/rtems/tasks.h>
 #include <rtems/rtems/dpmem.h>
-#include <rtems/rtems/event.h>
+#include <rtems/rtems/eventimpl.h>
 #include <rtems/extensionimpl.h>
 #include <rtems/fatal.h>
 #include <rtems/init.h>
@@ -269,14 +269,12 @@ uninitialized =
 
 /*dpmem.h*/     (sizeof _Dual_ported_memory_Information)  +
 
-/*event.h*/     (sizeof _Event_Sync_state)                +
+/*eventimpl.h*/ (sizeof _Event_Sync_state)                +
 
 #if defined(RTEMS_MULTIPROCESSING)
 /*eventmp.h*/   0                                         +
 #endif
 
-/*eventset.h*/  0                                         +
-
 /*extensionimpl.h*/ (sizeof _Extension_Information)       +
 
 /*fatal.h*/     0                                         +




More information about the vc mailing list