Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Jung2014-12-09 16:15:15 +0000
committerThomas Jung2014-12-09 16:15:15 +0000
commit91beff52d7a0c52390b17dcdfe2a37cb00a34fc4 (patch)
tree55018500573aa37f593ccd2bda8e52fa84b4060c /runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
parentf98dcd973aa82ad5064f93f288c65dc603860940 (diff)
downloadorg.eclipse.etrice-91beff52d7a0c52390b17dcdfe2a37cb00a34fc4.tar.gz
org.eclipse.etrice-91beff52d7a0c52390b17dcdfe2a37cb00a34fc4.tar.xz
org.eclipse.etrice-91beff52d7a0c52390b17dcdfe2a37cb00a34fc4.zip
etrice.runtime.c Interrupt included
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
index cd729b9a5..7a7110ad1 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/messaging/etMessageService.h
@@ -52,18 +52,25 @@ typedef struct etBuffer{
etUInt16 blockSize; /**< size of blocks for the message pool */
} etBuffer;
+typedef struct etHighPrioFunc etHighPrioFunc;
+struct etHighPrioFunc{
+ void (*func)(void *);
+ void * param;
+ etHighPrioFunc *next;
+};
+
typedef struct etMessageService {
- etMessageQueue messageQueue; /**< message queue that holds all used messages */
- etMessageQueue messagePool; /**< message pool that holds all free messages */
- etBuffer messageBuffer; /**< information about the message buffer that holds information about
- the actual memory position and size for the message pool */
- etDispatcherReceiveMessage msgDispatcher; /**< function pointer to the generated message dispatcher function */
- etThread thread; /**< thread for the execution of the message service */
- etMutex poolMutex; /**< mutex for synchronizing the access to the message pool */
- etMutex queueMutex; /**< mutex for synchronizing the access to the message queue */
- etSema executionSemaphore; /**< semaphore for waiting and waking up the execution */
- etTimer timer; /**< timer for cyclic calls */
- etMessageService_execmode execmode; /**< execution mode*/
+ etMessageQueue messageQueue; /** message queue that holds all used messages */
+ etMessageQueue messagePool; /** message pool that holds all free messages */
+ etBuffer messageBuffer; /** information about the message buffer that holds information about the actual memory position and size for the message pool */
+ etDispatcherReceiveMessage msgDispatcher; /** function pointer to the generated message dispatcher function */
+ etThread thread; /** thread for the execution of the message service */
+ etMutex poolMutex; /** mutex for synchronizing the access to the message pool */
+ etMutex queueMutex; /** mutex for synchronizing the access to the message queue */
+ etSema executionSemaphore; /** semaphore for waiting and waking up the execution */
+ etTimer timer; /** timer for cyclic calls */
+ etMessageService_execmode execmode; /** execution mode*/
+ etHighPrioFunc *highPrioFuncRoot;
} etMessageService;
/**
@@ -166,5 +173,8 @@ void etMessageService_returnMessageBuffer(etMessageService* self, etMessage* buf
*/
etInt16 etMessageService_getMessagePoolLowWaterMark(etMessageService* self);
+/* functions to register and unregister high prio functions */
+void etMessageService_registerHighPrioFunc(etMessageService* self, etHighPrioFunc* func);
+void etMessageService_unregisterHighPrioFunc(etMessageService* self, etHighPrioFunc* func);
#endif /* RMESSAGESERVICE_H_ */

Back to the top