source: rtems/cpukit/score/include/rtems/score/mppkt.h @ 5e9b32b

4.104.114.84.95
Last change on this file since 5e9b32b was 5e9b32b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/26/95 at 19:27:15

posix support initially added

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/*  mppkt.h
2 *
3 *  This package is the specification for the Packet Handler.
4 *  This handler defines the basic packet and provides
5 *  mechanisms to utilize packets based on this prefix.
6 *  Packets are the fundamental basis for messages passed between
7 *  nodes in an MP system.
8 *
9 *
10 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
11 *  On-Line Applications Research Corporation (OAR).
12 *  All rights assigned to U.S. Government, 1994.
13 *
14 *  This material may be reproduced by or for the U.S. Government pursuant
15 *  to the copyright license under the clause at DFARS 252.227-7013.  This
16 *  notice must appear in all copies of this file and its derivatives.
17 *
18 *  $Id$
19 */
20
21#ifndef __MP_PACKET_h
22#define __MP_PACKET_h
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include <rtems/score/object.h>
29#include <rtems/score/priority.h>
30#include <rtems/score/watchdog.h>
31
32/*
33 *  The following enumerated type defines the packet classes.
34 *
35 *  NOTE:  In general, each class corresponds to a manager
36 *         which supports global operations.  Each manager
37 *         defines the set of supported operations.
38 */
39
40typedef enum {
41  MP_PACKET_INTERNAL_THREADS = 0,
42  MP_PACKET_TASKS            = 1,
43  MP_PACKET_MESSAGE_QUEUE    = 2,
44  MP_PACKET_SEMAPHORE        = 3,
45  MP_PACKET_PARTITION        = 4,
46  MP_PACKET_REGION           = 5,
47  MP_PACKET_EVENT            = 6,
48  MP_PACKET_SIGNAL           = 7
49}   MP_packet_Classes;
50
51#define MP_PACKET_CLASSES_FIRST  MP_PACKET_INTERNAL_THREADS
52#define MP_PACKET_CLASSES_LAST   MP_PACKET_SIGNAL
53
54/*
55 *  The following record contains the prefix for every packet
56 *  passed between nodes in an MP system.
57 *
58 *  NOTE: This structure is padded to insure that anything
59 *        following it is on a 16 byte boundary.  This is
60 *        the most stringent structure alignment rule
61 *        encountered yet (i960CA).
62 */
63
64typedef struct {
65  MP_packet_Classes       the_class;
66  Objects_Id              id;
67  Objects_Id              source_tid;
68  Priority_Control        source_priority;
69  unsigned32              return_code;
70  unsigned32              length;
71  unsigned32              to_convert;
72  Watchdog_Interval       timeout;
73}   MP_packet_Prefix;
74
75/*
76 *  An MPCI must support packets of at least this size.
77 */
78
79#define MP_PACKET_MINIMUM_PACKET_SIZE  64
80
81/*
82 *  The following constant defines the number of unsigned32's
83 *  in a packet which must be converted to native format in a
84 *  heterogeneous system.  In packets longer than
85 *  MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
86 *  may a user message buffer which is not automatically endian swapped.
87 */
88
89#define MP_PACKET_MINIMUN_HETERO_CONVERSION  ( sizeof( MP_packet_Prefix ) / 4 )
90
91/*
92 *  _Mp_packet_Is_valid_packet_class
93 *
94 *  DESCRIPTION:
95 *
96 *  This function returns TRUE if the the_packet_class is valid,
97 *  and FALSE otherwise.
98 */
99
100STATIC INLINE boolean _Mp_packet_Is_valid_packet_class (
101  MP_packet_Classes the_packet_class
102);
103
104/*
105 *  _Mp_packet_Is_null
106 *
107 *  DESCRIPTION:
108 *
109 *  This function returns TRUE if the the_packet_class is null,
110 *  and FALSE otherwise.
111 */
112
113STATIC INLINE boolean _Mp_packet_Is_null (
114  MP_packet_Prefix   *the_packet
115);
116
117#include <rtems/score/mppkt.inl>
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif
124/* end of include file */
Note: See TracBrowser for help on using the repository browser.