diff options
Diffstat (limited to 'cpukit/score/include/rtems/score')
-rw-r--r-- | cpukit/score/include/rtems/score/coremsg.h | 14 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/coremsgimpl.h | 10 |
2 files changed, 13 insertions, 11 deletions
diff --git a/cpukit/score/include/rtems/score/coremsg.h b/cpukit/score/include/rtems/score/coremsg.h index 27443462fe..af42e7d63d 100644 --- a/cpukit/score/include/rtems/score/coremsg.h +++ b/cpukit/score/include/rtems/score/coremsg.h @@ -20,6 +20,7 @@ #define _RTEMS_SCORE_COREMSG_H #include <rtems/score/chain.h> +#include <rtems/score/isrlock.h> #include <rtems/score/threadq.h> #include <rtems/score/watchdog.h> @@ -63,6 +64,8 @@ extern "C" { #define RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND #endif +typedef struct CORE_message_queue_Control CORE_message_queue_Control; + /** * @brief Data types needed to manipulate the contents of message buffers. * @@ -117,7 +120,10 @@ typedef enum { * notification handler is invoked when the message queue makes a * 0->1 transition on pending messages. */ - typedef void (*CORE_message_queue_Notify_Handler)( void * ); + typedef void (*CORE_message_queue_Notify_Handler)( + CORE_message_queue_Control *, + ISR_lock_Context * + ); #endif /** @@ -126,7 +132,7 @@ typedef enum { * The following defines the control block used to manage each * Message Queue. */ -typedef struct { +struct CORE_message_queue_Control { /** This field is the Waiting Queue used to manage the set of tasks * which are blocked waiting to receive a message from this queue. */ @@ -162,14 +168,12 @@ typedef struct { * from zero (0) messages pending to one (1) message pending. */ CORE_message_queue_Notify_Handler notify_handler; - /** This field is the argument passed to the @ref notify_argument. */ - void *notify_argument; #endif /** This chain is the set of inactive messages. A message is inactive * when it does not contain a pending message. */ Chain_Control Inactive_messages; -} CORE_message_queue_Control; +}; /**@}*/ diff --git a/cpukit/score/include/rtems/score/coremsgimpl.h b/cpukit/score/include/rtems/score/coremsgimpl.h index b6103978e8..e3f0153fd9 100644 --- a/cpukit/score/include/rtems/score/coremsgimpl.h +++ b/cpukit/score/include/rtems/score/coremsgimpl.h @@ -612,17 +612,15 @@ RTEMS_INLINE_ROUTINE #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify ( CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Notify_Handler the_handler, - void *the_argument + CORE_message_queue_Notify_Handler the_handler ) { - the_message_queue->notify_handler = the_handler; - the_message_queue->notify_argument = the_argument; + the_message_queue->notify_handler = the_handler; } #else /* turn it into nothing if not enabled */ - #define _CORE_message_queue_Set_notify( \ - the_message_queue, the_handler, the_argument ) + #define _CORE_message_queue_Set_notify( the_message_queue, the_handler ) \ + do { } while ( 0 ) #endif RTEMS_INLINE_ROUTINE Thread_Control *_CORE_message_queue_Do_dequeue_receiver( |