OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [include/] [rtems/] [score/] [mppkt.h] - Blame information for rev 587

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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-1999.
11
 *  On-Line Applications Research Corporation (OAR).
12
 *
13
 *  The license and distribution terms for this file may be
14
 *  found in the file LICENSE in this distribution or at
15
 *  http://www.OARcorp.com/rtems/license.html.
16
 *
17
 *  $Id: mppkt.h,v 1.2 2001-09-27 11:59:32 chris Exp $
18
 */
19
 
20
#ifndef __MP_PACKET_h
21
#define __MP_PACKET_h
22
 
23
#ifdef __cplusplus
24
extern "C" {
25
#endif
26
 
27
#include <rtems/score/object.h>
28
#include <rtems/score/priority.h>
29
#include <rtems/score/watchdog.h>
30
 
31
/*
32
 *  The following enumerated type defines the packet classes.
33
 *
34
 *  NOTE:  In general, each class corresponds to a manager
35
 *         which supports global operations.  Each manager
36
 *         defines the set of supported operations.
37
 */
38
 
39
typedef enum {
40
  MP_PACKET_MPCI_INTERNAL    = 0,
41
  MP_PACKET_TASKS            = 1,
42
  MP_PACKET_MESSAGE_QUEUE    = 2,
43
  MP_PACKET_SEMAPHORE        = 3,
44
  MP_PACKET_PARTITION        = 4,
45
  MP_PACKET_REGION           = 5,
46
  MP_PACKET_EVENT            = 6,
47
  MP_PACKET_SIGNAL           = 7
48
}   MP_packet_Classes;
49
 
50
#define MP_PACKET_CLASSES_FIRST  MP_PACKET_MPCI_INTERNAL
51
#define MP_PACKET_CLASSES_LAST   MP_PACKET_SIGNAL
52
 
53
/*
54
 *  The following record contains the prefix for every packet
55
 *  passed between nodes in an MP system.
56
 *
57
 *  NOTE: This structure is padded to insure that anything
58
 *        following it is on a 16 byte boundary.  This is
59
 *        the most stringent structure alignment rule
60
 *        encountered yet (i960CA).
61
 */
62
 
63
typedef struct {
64
  MP_packet_Classes       the_class;
65
  Objects_Id              id;
66
  Objects_Id              source_tid;
67
  Priority_Control        source_priority;
68
  unsigned32              return_code;
69
  unsigned32              length;
70
  unsigned32              to_convert;
71
  Watchdog_Interval       timeout;
72
}   MP_packet_Prefix;
73
 
74
/*
75
 *  An MPCI must support packets of at least this size.
76
 */
77
 
78
#define MP_PACKET_MINIMUM_PACKET_SIZE  64
79
 
80
/*
81
 *  The following constant defines the number of unsigned32's
82
 *  in a packet which must be converted to native format in a
83
 *  heterogeneous system.  In packets longer than
84
 *  MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
85
 *  may a user message buffer which is not automatically endian swapped.
86
 */
87
 
88
#define MP_PACKET_MINIMUN_HETERO_CONVERSION  \
89
  ( sizeof( MP_packet_Prefix ) / sizeof( unsigned32 ) )
90
 
91
#ifndef __RTEMS_APPLICATION__
92
#include <rtems/score/mppkt.inl>
93
#endif
94
 
95
#ifdef __cplusplus
96
}
97
#endif
98
 
99
#endif
100
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.