RTEMS: cpukit/include/rtems/score/coremsg.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
coremsg.h
Go to the documentation of this file.
1
12/*
13 * COPYRIGHT (c) 1989-2009.
14 * On-Line Applications Research Corporation (OAR).
15 *
16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
18 * http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef _RTEMS_SCORE_COREMSG_H
22#define _RTEMS_SCORE_COREMSG_H
23
24#include <rtems/score/chain.h>
25#include <rtems/score/isrlock.h>
26#include <rtems/score/threadq.h>
27#include <rtems/score/watchdog.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
51#define RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY
52
53#if defined(RTEMS_POSIX_API)
59 #define RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION
60#endif
61
66#define RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND
67
68typedef struct CORE_message_queue_Control CORE_message_queue_Control;
69
79 typedef struct {
81 size_t size;
83 uint32_t buffer[1];
84} CORE_message_queue_Buffer;
85
92 typedef struct {
94 Chain_Node Node;
95 #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
97 int priority;
98 #endif
100 CORE_message_queue_Buffer Contents;
101} CORE_message_queue_Buffer_control;
102
109 typedef enum {
111 CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO,
113 CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY
114} CORE_message_queue_Disciplines;
115
116#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
124 typedef void (*CORE_message_queue_Notify_Handler)(
125 CORE_message_queue_Control *,
126 Thread_queue_Context *
127 );
128#endif
129
136 struct CORE_message_queue_Control {
140 Thread_queue_Control Wait_queue;
141
145 const Thread_queue_Operations *operations;
146
150 uint32_t maximum_pending_messages;
153 uint32_t number_of_pending_messages;
157 size_t maximum_message_size;
161 Chain_Control Pending_messages;
166 CORE_message_queue_Buffer *message_buffers;
167 #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
171 CORE_message_queue_Notify_Handler notify_handler;
172 #endif
176 Chain_Control Inactive_messages;
177};
178
181#ifdef __cplusplus
182}
183#endif
184
185#endif
186/* end of include file */
watchdog.h
Constants and Structures Associated with Watchdog Timers.
CORE_message_queue_Disciplines
CORE_message_queue_Disciplines
The possible blocking disciplines for a message queue.
Definition: coremsg.h:109
CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO
@ CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO
Definition: coremsg.h:111
CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY
@ CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY
Definition: coremsg.h:113
isrlock.h
ISR Locks.
chain.h
Chain Handler API.
CORE_message_queue_Buffer_control
The organization of a message buffer.
Definition: coremsg.h:92
CORE_message_queue_Buffer_control::Contents
CORE_message_queue_Buffer Contents
Definition: coremsg.h:100
CORE_message_queue_Buffer_control::Node
Chain_Node Node
Definition: coremsg.h:94
CORE_message_queue_Buffer_control::priority
int priority
Definition: coremsg.h:97
CORE_message_queue_Buffer
Data types needed to manipulate the contents of message buffers.
Definition: coremsg.h:79
CORE_message_queue_Buffer::size
size_t size
Definition: coremsg.h:81
CORE_message_queue_Control
Control block used to manage each message queue.
Definition: coremsg.h:136
CORE_message_queue_Control::Inactive_messages
Chain_Control Inactive_messages
Definition: coremsg.h:176
CORE_message_queue_Control::operations
const Thread_queue_Operations * operations
The thread queue operations according to the blocking discipline.
Definition: coremsg.h:145
CORE_message_queue_Control::maximum_message_size
size_t maximum_message_size
Definition: coremsg.h:157
CORE_message_queue_Control::number_of_pending_messages
uint32_t number_of_pending_messages
Definition: coremsg.h:153
CORE_message_queue_Control::message_buffers
CORE_message_queue_Buffer * message_buffers
Definition: coremsg.h:166
CORE_message_queue_Control::Wait_queue
Thread_queue_Control Wait_queue
Definition: coremsg.h:140
CORE_message_queue_Control::Pending_messages
Chain_Control Pending_messages
Definition: coremsg.h:161
CORE_message_queue_Control::maximum_pending_messages
uint32_t maximum_pending_messages
Definition: coremsg.h:150
Chain_Node_struct
Definition: chain.h:68
Thread_queue_Context
Thread queue context for the thread queue methods.
Definition: threadq.h:198
Thread_queue_Control
Definition: threadq.h:553
Thread_queue_Operations
Thread queue operations.
Definition: threadq.h:518
threadq.h
Constants and Structures Needed to Declare a Thread Queue.
Chain_Control
Definition: chain.h:86