source: rtems/c/src/exec/posix/headers/condmp.h @ eb5a7e07

4.104.114.84.95
Last change on this file since eb5a7e07 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: 4.4 KB
Line 
1/*  condmp.h
2 *
3 *  This include file contains all the constants and structures associated
4 *  with the Multiprocessing Support in the POSIX Condition Variable Manager.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_MP_h
18#define __RTEMS_POSIX_CONDITION_VARIABLES_MP_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/score/mppkt.h>
25#include <rtems/score/object.h>
26#include <rtems/score/thread.h>
27#include <rtems/score/watchdog.h>
28
29/*
30 *  The following enumerated type defines the list of
31 *  remote condition variable operations.
32 */
33
34typedef enum {
35  POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE  =  0,
36  POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE  =  1,
37  POSIX_CONDITION_VARIABLES_MP_EXTRACT_PROXY    =  2,
38  POSIX_CONDITION_VARIABLES_MP_OBTAIN_REQUEST   =  3,
39  POSIX_CONDITION_VARIABLES_MP_OBTAIN_RESPONSE  =  4,
40  POSIX_CONDITION_VARIABLES_MP_RELEASE_REQUEST  =  5,
41  POSIX_CONDITION_VARIABLES_MP_RELEASE_RESPONSE =  6,
42}   POSIX_Condition_variables_MP_Remote_operations;
43
44/*
45 *  The following data structure defines the packet used to perform
46 *  remote condition variable operations.
47 */
48
49typedef struct {
50  MP_packet_Prefix                                Prefix;
51  POSIX_Condition_variables_MP_Remote_operations  operation;
52  Objects_Name                                    name;
53  boolean                                         wait;  /* XXX options */
54  Objects_Id                                      proxy_id;
55}   POSIX_Condition_variables_MP_Packet;
56
57/*
58 *  _POSIX_Condition_variables_MP_Send_process_packet
59 *
60 *  DESCRIPTION:
61 *
62 *  This routine performs a remote procedure call so that a
63 *  process operation can be performed on another node.
64 */
65
66void _POSIX_Condition_variables_MP_Send_process_packet (
67  POSIX_Condition_variables_MP_Remote_operations  operation,
68  Objects_Id                        condition_variables_id,
69  Objects_Name                      name,
70  Objects_Id                        proxy_id
71);
72
73/*
74 *  _POSIX_Condition_variables_MP_Send_request_packet
75 *
76 *  DESCRIPTION:
77 *
78 *  This routine performs a remote procedure call so that a
79 *  directive operation can be initiated on another node.
80 */
81
82int _POSIX_Condition_variables_MP_Send_request_packet (
83  POSIX_Condition_variables_MP_Remote_operations  operation,
84  Objects_Id                                      condition_variables_id,
85  boolean                                         wait,  /* XXX options */
86  Watchdog_Interval                               timeout
87);
88
89/*
90 *  _POSIX_Condition_variables_MP_Send_response_packet
91 *
92 *  DESCRIPTION:
93 *
94 *  This routine performs a remote procedure call so that a
95 *  directive can be performed on another node.
96 */
97
98void _POSIX_Condition_variables_MP_Send_response_packet (
99  POSIX_Condition_variables_MP_Remote_operations  operation,
100  Objects_Id                        condition_variables_id,
101  Thread_Control                   *the_thread
102);
103
104/*
105 *
106 *  _POSIX_Condition_variables_MP_Process_packet
107 *
108 *  DESCRIPTION:
109 *
110 *  This routine performs the actions specific to this package for
111 *  the request from another node.
112 */
113
114void _POSIX_Condition_variables_MP_Process_packet (
115  MP_packet_Prefix *the_packet_prefix
116);
117
118/*
119 *  _POSIX_Condition_variables_MP_Send_object_was_deleted
120 *
121 *  DESCRIPTION:
122 *
123 *  This routine is invoked indirectly by the thread queue
124 *  when a proxy has been removed from the thread queue and
125 *  the remote node must be informed of this.
126 */
127
128void _POSIX_Condition_variables_MP_Send_object_was_deleted (
129  Thread_Control *the_proxy
130);
131
132/*
133 *  _POSIX_Condition_variables_MP_Send_extract_proxy
134 *
135 *  DESCRIPTION:
136 *
137 *  This routine is invoked when a task is deleted and it
138 *  has a proxy which must be removed from a thread queue and
139 *  the remote node must be informed of this.
140 */
141
142void _POSIX_Condition_variables_MP_Send_extract_proxy (
143  Thread_Control *the_thread
144);
145
146/*
147 *  _POSIX_Condition_variables_MP_Get_packet
148 *
149 *  DESCRIPTION:
150 *
151 *  This function is used to obtain a condition variable mp packet.
152 */
153
154POSIX_Condition_variables_MP_Packet
155  *_POSIX_Condition_variables_MP_Get_packet ( void );
156
157#ifdef __cplusplus
158}
159#endif
160
161#endif
162/* end of file */
Note: See TracBrowser for help on using the repository browser.