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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [include/] [rtems/] [posix/] [mqueuemp.h] - Blame information for rev 546

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

Line No. Rev Author Line
1 30 unneback
/*  mqueuemp.h
2
 *
3
 *  This include file contains all the constants and structures associated
4
 *  with the Multiprocessing Support in the POSIX Message Queue Manager.
5
 *
6
 *  COPYRIGHT (c) 1989-1999.
7
 *  On-Line Applications Research Corporation (OAR).
8
 *
9
 *  The license and distribution terms for this file may be
10
 *  found in the file LICENSE in this distribution or at
11
 *  http://www.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id: mqueuemp.h,v 1.2 2001-09-27 11:59:14 chris Exp $
14
 */
15
 
16
#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_MP_h
17
#define __RTEMS_POSIX_MESSAGE_QUEUE_MP_h
18
 
19
#ifdef __cplusplus
20
extern "C" {
21
#endif
22
 
23
#include <rtems/score/mppkt.h>
24
#include <rtems/score/object.h>
25
#include <rtems/score/thread.h>
26
#include <rtems/score/watchdog.h>
27
 
28
/*
29
 *  The following enumerated type defines the list of
30
 *  remote message queue operations.
31
 */
32
 
33
typedef enum {
34
  POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_CREATE  =  0,
35
  POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE  =  1,
36
  POSIX_MESSAGE_QUEUE_MP_EXTRACT_PROXY    =  2,
37
  POSIX_MESSAGE_QUEUE_MP_OBTAIN_REQUEST   =  3,
38
  POSIX_MESSAGE_QUEUE_MP_OBTAIN_RESPONSE  =  4,
39
  POSIX_MESSAGE_QUEUE_MP_RELEASE_REQUEST  =  5,
40
  POSIX_MESSAGE_QUEUE_MP_RELEASE_RESPONSE =  6,
41
}   POSIX_Message_queue_MP_Remote_operations;
42
 
43
/*
44
 *  The following data structure defines the packet used to perform
45
 *  remote message queue operations.
46
 */
47
 
48
typedef struct {
49
  MP_packet_Prefix                          Prefix;
50
  POSIX_Message_queue_MP_Remote_operations  operation;
51
  Objects_Name                              name;
52
  boolean                                   wait;  /* XXX options */
53
  Objects_Id                                proxy_id;
54
}   POSIX_Message_queue_MP_Packet;
55
 
56
/*
57
 *  _POSIX_Message_queue_MP_Send_process_packet
58
 *
59
 *  DESCRIPTION:
60
 *
61
 *  This routine performs a remote procedure call so that a
62
 *  process operation can be performed on another node.
63
 */
64
 
65
void _POSIX_Message_queue_MP_Send_process_packet (
66
  POSIX_Message_queue_MP_Remote_operations  operation,
67
  Objects_Id                        mq_id,
68
  Objects_Name                      name,
69
  Objects_Id                        proxy_id
70
);
71
 
72
/*
73
 *  _POSIX_Message_queue_MP_Send_request_packet
74
 *
75
 *  DESCRIPTION:
76
 *
77
 *  This routine performs a remote procedure call so that a
78
 *  directive operation can be initiated on another node.
79
 */
80
 
81
int _POSIX_Message_queue_MP_Send_request_packet (
82
  POSIX_Message_queue_MP_Remote_operations  operation,
83
  Objects_Id                                mq_id,
84
  boolean                                   wait,  /* XXX options */
85
  Watchdog_Interval                         timeout
86
);
87
 
88
/*
89
 *  _POSIX_Message_queue_MP_Send_response_packet
90
 *
91
 *  DESCRIPTION:
92
 *
93
 *  This routine performs a remote procedure call so that a
94
 *  directive can be performed on another node.
95
 */
96
 
97
void _POSIX_Message_queue_MP_Send_response_packet (
98
  POSIX_Message_queue_MP_Remote_operations  operation,
99
  Objects_Id                        mq_id,
100
  Thread_Control                   *the_thread
101
);
102
 
103
/*
104
 *
105
 *  _POSIX_Message_queue_MP_Process_packet
106
 *
107
 *  DESCRIPTION:
108
 *
109
 *  This routine performs the actions specific to this package for
110
 *  the request from another node.
111
 */
112
 
113
void _POSIX_Message_queue_MP_Process_packet (
114
  MP_packet_Prefix *the_packet_prefix
115
);
116
 
117
/*
118
 *  _POSIX_Message_queue_MP_Send_object_was_deleted
119
 *
120
 *  DESCRIPTION:
121
 *
122
 *  This routine is invoked indirectly by the thread queue
123
 *  when a proxy has been removed from the thread queue and
124
 *  the remote node must be informed of this.
125
 */
126
 
127
void _POSIX_Message_queue_MP_Send_object_was_deleted (
128
  Thread_Control *the_proxy
129
);
130
 
131
/*
132
 *  _POSIX_Message_queue_MP_Send_extract_proxy
133
 *
134
 *  DESCRIPTION:
135
 *
136
 *  This routine is invoked when a task is deleted and it
137
 *  has a proxy which must be removed from a thread queue and
138
 *  the remote node must be informed of this.
139
 */
140
 
141
void _POSIX_Message_queue_MP_Send_extract_proxy (
142
  Thread_Control *the_thread
143
);
144
 
145
/*
146
 *  _POSIX_Message_queue_MP_Get_packet
147
 *
148
 *  DESCRIPTION:
149
 *
150
 *  This function is used to obtain a message queue mp packet.
151
 */
152
 
153
POSIX_Message_queue_MP_Packet *_POSIX_Message_queue_MP_Get_packet ( void );
154
 
155
#ifdef __cplusplus
156
}
157
#endif
158
 
159
#endif
160
/* end of file */

powered by: WebSVN 2.1.0

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