summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/coremsg.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-29 11:05:36 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-02 07:46:15 +0200
commit7e66865e17d7a82add541056de13717793da002a (patch)
tree924312da2c1abe33c48b6ec84102cde59c28074c /cpukit/score/include/rtems/score/coremsg.h
parentscore: _CORE_message_queue_Insert_message() (diff)
downloadrtems-7e66865e17d7a82add541056de13717793da002a.tar.bz2
score: Move message notification
Move message notification to end of critical section and delegate the message queue release to the notification handler. It may do more complex notification actions out of the critical section. Update #2555.
Diffstat (limited to 'cpukit/score/include/rtems/score/coremsg.h')
-rw-r--r--cpukit/score/include/rtems/score/coremsg.h14
1 files changed, 9 insertions, 5 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;
+};
/**@}*/