source: rtems/cpukit/include/rtems/score/mppkt.h @ 21275b58

5
Last change on this file since 21275b58 was ccc6695, checked in by Sebastian Huber <sebastian.huber@…>, on 11/08/18 at 10:50:24

score: Introduce <rtems/score/watchdogticks.h>

Separate the definitions related to watchdog ticks from the watchdog
structures.

Update #3598.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/**
2 *  @file  rtems/score/mppkt.h
3 *
4 *  @brief Specification for the Packet Handler
5 *
6 *  This package is the specification for the Packet Handler.
7 *  This handler defines the basic packet and provides
8 *  mechanisms to utilize packets based on this prefix.
9 *  Packets are the fundamental basis for messages passed between
10 *  nodes in an MP system.
11 */
12
13/*
14 *  COPYRIGHT (c) 1989-2011.
15 *  On-Line Applications Research Corporation (OAR).
16 *
17 *  The license and distribution terms for this file may be
18 *  found in the file LICENSE in this distribution or at
19 *  http://www.rtems.org/license/LICENSE.
20 */
21
22#ifndef _RTEMS_SCORE_MPPKT_H
23#define _RTEMS_SCORE_MPPKT_H
24
25#include <rtems/score/object.h>
26#include <rtems/score/priority.h>
27#include <rtems/score/watchdogticks.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33/**
34 *  @defgroup ScoreMPPacket MP Packet Handler
35 *
36 *  @ingroup Score
37 *
38 *  This handler encapsulates the primary definition of MPCI packets.  This
39 *  handler defines the part of the packet that is common to all remote
40 *  operations.
41 */
42/**@{*/
43
44/**
45 *  The following enumerated type defines the packet classes.
46 *
47 *  @note  In general, each class corresponds to a manager
48 *         which supports global operations.  Each manager
49 *         defines the set of supported operations.
50 */
51typedef enum {
52  MP_PACKET_MPCI_INTERNAL    = 0,
53  MP_PACKET_TASKS            = 1,
54  MP_PACKET_MESSAGE_QUEUE    = 2,
55  MP_PACKET_SEMAPHORE        = 3,
56  MP_PACKET_PARTITION        = 4,
57  MP_PACKET_REGION           = 5,
58  MP_PACKET_EVENT            = 6,
59  MP_PACKET_SIGNAL           = 7
60}   MP_packet_Classes;
61
62/**
63 *  This constant defines the first entry in the MP_packet_Classes enumeration.
64 */
65#define MP_PACKET_CLASSES_FIRST  MP_PACKET_MPCI_INTERNAL
66
67/**
68 *  This constant defines the last entry in the MP_packet_Classes enumeration.
69 */
70#define MP_PACKET_CLASSES_LAST   MP_PACKET_SIGNAL
71
72/**
73 *  The following record contains the prefix for every packet
74 *  passed between nodes in an MP system.
75 *
76 *  @note This structure is padded to ensure that anything following it
77 *        is on a 16 byte boundary.  This is the most stringent structure
78 *        alignment rule encountered yet.
79 */
80typedef struct {
81  /** This field indicates the API class of the operation being performed. */
82  MP_packet_Classes       the_class;
83  /** This field is the id of the object to be acted upon. */
84  Objects_Id              id;
85  /** This field is the ID of the originating thread. */
86  Objects_Id              source_tid;
87  /** This field is the priority of the originating thread. */
88  uint32_t                source_priority;
89  /** This field is where the status of the operation will be returned. */
90  uint32_t                return_code;
91  /** This field is the length of the data following the prefix. */
92  uint32_t                length;
93  /** This field is the length of the data which required network conversion. */
94  uint32_t                to_convert;
95  /** This field is the requested timeout for this operation. */
96  Watchdog_Interval       timeout;
97}   MP_packet_Prefix;
98
99/**
100 *  An MPCI must support packets of at least this size.
101 */
102#define MP_PACKET_MINIMUM_PACKET_SIZE  64
103
104/**
105 *  The following constant defines the number of uint32_t's
106 *  in a packet which must be converted to native format in a
107 *  heterogeneous system.  In packets longer than
108 *  MP_PACKET_MINIMUN_HETERO_CONVERSION uint32_t's, some of the "extra" data
109 *  may a user message buffer which is not automatically endian swapped.
110 */
111#define MP_PACKET_MINIMUN_HETERO_CONVERSION  \
112  ( sizeof( MP_packet_Prefix ) / sizeof( uint32_t   ) )
113
114/**@}*/
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif
121/* end of include file */
Note: See TracBrowser for help on using the repository browser.